// 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/StylePropertyGroup.h>

#include "DisplayPropertyGroupQuick.h"
#include "LayoutPropertyGroupQuick.h"
#include "TextPropertyGroupQuick.h"
#include "IconPropertyGroupQuick.h"
#include "BackgroundPropertyGroupQuick.h"
#include "BorderPropertyGroupQuick.h"
#include "OutlinePropertyGroupQuick.h"
#include "CornersPropertyGroupQuick.h"
#include "ShadowPropertyGroupQuick.h"
// clang-format on

namespace Union
{
namespace Quick
{

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

public:
    explicit StylePropertyGroupQuick(QuickStyle *style);

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

    void refreshColors();

    /*!
     * \qmlproperty DisplayPropertyGroupQuick StylePropertyGroupQuick::display
     *
     * Exposes StylePropertyGroup::DisplayPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::DisplayPropertyGroupQuick *display READ display CONSTANT)
    DisplayPropertyGroupQuick *display() const;

    /*!
     * \qmlproperty LayoutPropertyGroupQuick StylePropertyGroupQuick::layout
     *
     * Exposes StylePropertyGroup::LayoutPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::LayoutPropertyGroupQuick *layout READ layout CONSTANT)
    LayoutPropertyGroupQuick *layout() const;

    /*!
     * \qmlproperty TextPropertyGroupQuick StylePropertyGroupQuick::text
     *
     * Exposes StylePropertyGroup::TextPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::TextPropertyGroupQuick *text READ text CONSTANT)
    TextPropertyGroupQuick *text() const;

    /*!
     * \qmlproperty IconPropertyGroupQuick StylePropertyGroupQuick::icon
     *
     * Exposes StylePropertyGroup::IconPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::IconPropertyGroupQuick *icon READ icon CONSTANT)
    IconPropertyGroupQuick *icon() const;

    /*!
     * \qmlproperty BackgroundPropertyGroupQuick StylePropertyGroupQuick::background
     *
     * Exposes StylePropertyGroup::BackgroundPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::BackgroundPropertyGroupQuick *background READ background CONSTANT)
    BackgroundPropertyGroupQuick *background() const;

    /*!
     * \qmlproperty BorderPropertyGroupQuick StylePropertyGroupQuick::border
     *
     * Exposes StylePropertyGroup::BorderPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::BorderPropertyGroupQuick *border READ border CONSTANT)
    BorderPropertyGroupQuick *border() const;

    /*!
     * \qmlproperty OutlinePropertyGroupQuick StylePropertyGroupQuick::outline
     *
     * Exposes StylePropertyGroup::OutlinePropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::OutlinePropertyGroupQuick *outline READ outline CONSTANT)
    OutlinePropertyGroupQuick *outline() const;

    /*!
     * \qmlproperty CornersPropertyGroupQuick StylePropertyGroupQuick::corners
     *
     * Exposes StylePropertyGroup::CornersPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::CornersPropertyGroupQuick *corners READ corners CONSTANT)
    CornersPropertyGroupQuick *corners() const;

    /*!
     * \qmlproperty ShadowPropertyGroupQuick StylePropertyGroupQuick::shadow
     *
     * Exposes StylePropertyGroup::ShadowPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::ShadowPropertyGroupQuick *shadow READ shadow CONSTANT)
    ShadowPropertyGroupQuick *shadow() const;

private:
    QuickStyle *m_style = nullptr;
    std::unique_ptr<DisplayPropertyGroupQuick> m_display;
    std::unique_ptr<LayoutPropertyGroupQuick> m_layout;
    std::unique_ptr<TextPropertyGroupQuick> m_text;
    std::unique_ptr<IconPropertyGroupQuick> m_icon;
    std::unique_ptr<BackgroundPropertyGroupQuick> m_background;
    std::unique_ptr<BorderPropertyGroupQuick> m_border;
    std::unique_ptr<OutlinePropertyGroupQuick> m_outline;
    std::unique_ptr<CornersPropertyGroupQuick> m_corners;
    std::unique_ptr<ShadowPropertyGroupQuick> m_shadow;

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

}
}