#ifndef AUTOTESTS_WINDOWS_STUB_GLOBAL_SETTINGS_H
#define AUTOTESTS_WINDOWS_STUB_GLOBAL_SETTINGS_H

#include <QObject>
#include <QVariant>
#include <QMap>

#define TABLET_MODE "tablet-mode"
#define IS_LITE_MODE "isLiteMode"
#define UKUI_PANEL_POSITION_KEY "panelposition"
#define UKUI_PANEL_SIZE_KEY "panelsize"
#define UKUI_PANEL_TYPE_KEY "paneltype"
#define UKUI_SETTINGS_ISLAND_POSITION_KEY "settingsislandposition"
#define UKUI_DATA_ISLAND_POSITION_KEY "dataislandposition"
#define UKUI_TOPBAR_SIZE_KEY "topbarsize"
#define UKUI_PANEL_LENGTH_KEY "panellength"

namespace Sidebar {

class GlobalSettings : public QObject
{
    Q_OBJECT
public:
    static GlobalSettings *globalInstance(QObject *parent = nullptr);
    QVariant getValue(const QString &key) const;
    QStringList getKeys() const;
    int getPanelLength(const QString &screenName) const;
    void setValue(const QString &key, const QVariant &value);
    void setPanelLength(const QString &screenName, int length);
    void reset();

Q_SIGNALS:
    void valueChanged(const QString &key);

private:
    explicit GlobalSettings(QObject *parent = nullptr);
    QMap<QString, QVariant> m_values;
    QMap<QString, int> m_panelLengths;
};

} // namespace Sidebar

#endif
