// SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
// SPDX-FileCopyrightText: 2024 Arjen Hiemstra <ahiemstra@heimr.nl>
//
// This file is automatically generated from qml_group.h.j2.
// To regenerate, run `tools/propertygenerator/generate_properties.py`.

#pragma once

// clang-format off
#include <QJSValue>
#include <QObject>
#include <QProperty>
#include <qqmlregistration.h>


#include <properties/CornersProperty.h>

#include "CornerPropertyGroup.h"
#include "CornerPropertyGroup.h"
#include "CornerPropertyGroup.h"
#include "CornerPropertyGroup.h"
// clang-format on

namespace Union
{
namespace Quick
{

class QuickStyle;

/*!
 * \qmltype CornersPropertyGroup
 * \inqmlmodule org.kde.union.impl
 * \ingroup qtquick-properties
 *
 * \brief A group object exposing the properties of CornersProperty to QML.
 */
class CornersPropertyGroup : public QObject
{
    Q_OBJECT
    QML_ANONYMOUS

public:
    explicit CornersPropertyGroup(QuickStyle *style);

    void update(Union::Properties::CornersProperty *newState);
    Q_SIGNAL void updated();

    void refreshColors();

    /*!
     * \qmlproperty CornerPropertyGroup CornersPropertyGroup::topLeft
     *
     * Exposes CornersProperty::CornerProperty to QML.
     */
    Q_PROPERTY(Union::Quick::CornerPropertyGroup *topLeft READ topLeft CONSTANT)
    CornerPropertyGroup *topLeft() const;

    /*!
     * \qmlproperty CornerPropertyGroup CornersPropertyGroup::topRight
     *
     * Exposes CornersProperty::CornerProperty to QML.
     */
    Q_PROPERTY(Union::Quick::CornerPropertyGroup *topRight READ topRight CONSTANT)
    CornerPropertyGroup *topRight() const;

    /*!
     * \qmlproperty CornerPropertyGroup CornersPropertyGroup::bottomLeft
     *
     * Exposes CornersProperty::CornerProperty to QML.
     */
    Q_PROPERTY(Union::Quick::CornerPropertyGroup *bottomLeft READ bottomLeft CONSTANT)
    CornerPropertyGroup *bottomLeft() const;

    /*!
     * \qmlproperty CornerPropertyGroup CornersPropertyGroup::bottomRight
     *
     * Exposes CornersProperty::CornerProperty to QML.
     */
    Q_PROPERTY(Union::Quick::CornerPropertyGroup *bottomRight READ bottomRight CONSTANT)
    CornerPropertyGroup *bottomRight() const;

private:
    QuickStyle *m_style = nullptr;
    std::unique_ptr<CornerPropertyGroup> m_topLeft;
    std::unique_ptr<CornerPropertyGroup> m_topRight;
    std::unique_ptr<CornerPropertyGroup> m_bottomLeft;
    std::unique_ptr<CornerPropertyGroup> m_bottomRight;

    Union::Properties::CornersProperty *m_state = nullptr;
};

}
}