#ifndef UKUI_SIDEBAR_SIDEBAR_MAIN_H
#define UKUI_SIDEBAR_SIDEBAR_MAIN_H

#include <QObject>
#include <QVariantMap>

class SidebarMain : public QObject
{
    Q_OBJECT
public:
    enum Request {
        Active,
        Show,
        Hide,
        DirectlyHide
    };

    explicit SidebarMain(QObject *parent = nullptr);

    void requestWidgetActive(const QString &id, bool showReturnButton);

    static void resetRecords();
    static QStringList calls();
    static QString lastWidgetId();
    static bool lastShowReturnButton();
    static QString lastParsedMessage();

public Q_SLOTS:
    void parseMessage(const QString &msg);
    void requestSidebar(SidebarMain::Request request);
    void requestShortcut(SidebarMain::Request request);
    void requestNotificationCenter(SidebarMain::Request request);

Q_SIGNALS:
    void stateChange(const QString &module, const QVariantMap &data);
};

#endif
