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

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

namespace Union
{
namespace Quick
{

class QuickStyle;

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

public:
    explicit OutlinePropertyGroup(QuickStyle *style);

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

    void refreshColors();

    /*!
     * \qmlproperty LinePropertyGroup OutlinePropertyGroup::left
     *
     * Exposes OutlineProperty::LineProperty to QML.
     */
    Q_PROPERTY(Union::Quick::LinePropertyGroup *left READ left CONSTANT)
    LinePropertyGroup *left() const;

    /*!
     * \qmlproperty LinePropertyGroup OutlinePropertyGroup::right
     *
     * Exposes OutlineProperty::LineProperty to QML.
     */
    Q_PROPERTY(Union::Quick::LinePropertyGroup *right READ right CONSTANT)
    LinePropertyGroup *right() const;

    /*!
     * \qmlproperty LinePropertyGroup OutlinePropertyGroup::top
     *
     * Exposes OutlineProperty::LineProperty to QML.
     */
    Q_PROPERTY(Union::Quick::LinePropertyGroup *top READ top CONSTANT)
    LinePropertyGroup *top() const;

    /*!
     * \qmlproperty LinePropertyGroup OutlinePropertyGroup::bottom
     *
     * Exposes OutlineProperty::LineProperty to QML.
     */
    Q_PROPERTY(Union::Quick::LinePropertyGroup *bottom READ bottom CONSTANT)
    LinePropertyGroup *bottom() const;

private:
    QuickStyle *m_style = nullptr;
    std::unique_ptr<LinePropertyGroup> m_left;
    std::unique_ptr<LinePropertyGroup> m_right;
    std::unique_ptr<LinePropertyGroup> m_top;
    std::unique_ptr<LinePropertyGroup> m_bottom;

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

}
}