#ifndef AUTOTESTS_WINDOWS_STUB_SCREEN_MONITOR_H
#define AUTOTESTS_WINDOWS_STUB_SCREEN_MONITOR_H

#include <QObject>
#include <QPointer>
#include <QScreen>

namespace Sidebar {

class ScreenMonitor : public QObject
{
    Q_OBJECT
public:
    static ScreenMonitor *getInstance();

    bool getScreenLockState() const;
    QScreen *getPrimaryScreen() const;
    QRect getGeometry() const;
    Qt::LayoutDirection getLayoutDirection() const;
    int getPanelPosition() const;
    int getPanelSize() const;

    void setScreenLockState(bool state);
    void setPrimaryScreen(QScreen *screen);
    void setLayoutDirection(Qt::LayoutDirection direction);
    void setPanelPosition(int position);
    void setPanelSize(int size);
    void emitPanelPropertyChanged();
    void reset();

Q_SIGNALS:
    void primaryScreenChanged();
    void geometryChanged(const QRect &geometry);
    void panelPropertyChanged();
    void layoutDirectionChanged();
    void screenLockStateChanged(bool state);
    void screenRemoved(QScreen *screen);

private:
    explicit ScreenMonitor(QObject *parent = nullptr);

    bool m_screenLockState = false;
    QPointer<QScreen> m_primaryScreen = nullptr;
    Qt::LayoutDirection m_direction = Qt::LeftToRight;
    int m_panelPosition = 0;
    int m_panelSize = 0;
};

} // namespace Sidebar

#endif
