/*
   This example code is in the Public Domain (or CC0 licensed, at your option.)

   Unless required by applicable law or agreed to in writing, this
   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once

#include <app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-delegate.h>

/*
 * Mock ValveConfigurationAndControl Delegate Implementation
 * This file provides a mock implementation of the ValveConfigurationAndControl::Delegate interface
 * that returns success for all methods.
 * For more details, take a look at the delegate interface in the Matter SDK.
 * 1. Delegate Interface: https://github.com/project-chip/connectedhomeip/blob/d144bbb/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-delegate.h
 * 2. Delegate Implementation: https://github.com/project-chip/connectedhomeip/blob/d144bbb/examples/all-clusters-app/linux/ValveControlDelegate.h and
 *    https://github.com/project-chip/connectedhomeip/blob/d144bbb/examples/all-clusters-app/linux/ValveControlDelegate.cpp
 */

namespace chip {
namespace app {
namespace Clusters {
namespace ValveConfigurationAndControl {

class MockValveConfigurationAndControlDelegate : public Delegate {
public:
    MockValveConfigurationAndControlDelegate() : Delegate() {}
    virtual ~MockValveConfigurationAndControlDelegate() = default;

    // Valve configuration and control handlers
    DataModel::Nullable<chip::Percent> HandleOpenValve(DataModel::Nullable<chip::Percent> level) override;
    CHIP_ERROR HandleCloseValve() override;
    void HandleRemainingDurationTick(uint32_t duration) override;

private:
    static constexpr const char * LOG_TAG = "MockValveConfigurationAndControlDelegate";
};

} // namespace ValveConfigurationAndControl
} // namespace Clusters
} // namespace app
} // namespace chip