#ifndef ZIGBEE_DIMMABLE_LIGHT_SWITCH_H
#define ZIGBEE_DIMMABLE_LIGHT_SWITCH_H

#include "zboss_api.h"

#include "zboss_api_addons.h"

/** @brief Declare simple descriptor for Dimmer Switch device.
    @param ep_name - Endpoint variable name.
    @param ep_id - Endpoint ID.
    @param in_clust_num - Number of supported input clusters.
    @param out_clust_num - Number of supported output clusters.
*/
#define ZB_ZCL_DECLARE_DIMMER_SWITCH_SIMPLE_DESC_VA(                                        \
    ep_name, ep_id, in_clust_num, out_clust_num)                                            \
    ZB_DECLARE_SIMPLE_DESC_VA(in_clust_num, out_clust_num, ep_name);                        \
    ZB_AF_SIMPLE_DESC_TYPE_VA(in_clust_num, out_clust_num, ep_name) simple_desc_##ep_name = \
    {                                                                                       \
        ep_id,                                                                              \
        ZB_AF_HA_PROFILE_ID,                                                                \
        ZB_HA_DIMMER_SWITCH_DEVICE_ID,                                                      \
        ZB_HA_DEVICE_VER_DIMMER_SWITCH,                                                     \
        0,                                                                                  \
        in_clust_num,                                                                       \
        out_clust_num,                                                                      \
        {                                                                                   \
            ZB_ZCL_CLUSTER_ID_BASIC,                                                        \
            ZB_ZCL_CLUSTER_ID_IDENTIFY,                                                     \
            ZB_ZCL_CLUSTER_ID_ON_OFF,                                                       \
            ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL,                                                \
            ZB_ZCL_CLUSTER_ID_SCENES,                                                       \
            ZB_ZCL_CLUSTER_ID_GROUPS,                                                       \
            ZB_ZCL_CLUSTER_ID_IDENTIFY,                                                     \
        }                                                                                   \
    }

/**@brief Declare Dimmer Switch endpoint.
 *
 * @param[IN] ep_name                Endpoint variable name.
 * @param[IN] ep_id [IN]             Endpoint ID.
 * @param[IN] cluster_list [IN]      List of endpoint clusters.
 */
#define ZB_ZCL_DECLARE_DIMMER_SWITCH_EP(ep_name, ep_id, cluster_list)                                 \
    ZB_ZCL_DECLARE_DIMMER_SWITCH_SIMPLE_DESC_VA(                                                      \
        ep_name,                                                                                      \
        ep_id,                                                                                        \
        ZB_HA_DIMMER_SWITCH_IN_CLUSTER_NUM,                                                           \
        ZB_HA_DIMMER_SWITCH_OUT_CLUSTER_NUM);                                                         \
    ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL,                         \
                                ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
                                (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name,                     \
                                0, NULL, /* No reporting ctx. */                                      \
                                0, NULL) /* No CVC ctx. */

#endif /* ZIGBEE_DIMMABLE_LIGHT_SWITCH_H */