#ifndef UIMANAGER_H
#define UIMANAGER_H

#include <QObject>
#include <QWidget>
#include <QTableView>
#include <QStandardItemModel>
#include <memory>
#include "playbookmanager.h"

class UIManager : public QObject
{
    Q_OBJECT

public:
    explicit UIManager(QWidget *parent, PlaybookManager *playbookManager);

    void setupUI();
    void updatePlaybookTable();

    enum Theme {
        Light,
        Dark,
        Blue
    };

    static UIManager& instance();
    void setTheme(Theme theme);
    Theme currentTheme() const { return m_currentTheme; }

private slots:
    void onPlaybookDoubleClicked(const QModelIndex &index);

private:
    QWidget *m_parentWidget;
    PlaybookManager *m_playbookManager;
    std::unique_ptr<QTableView> m_playbookTable;
    std::unique_ptr<QStandardItemModel> m_playbookModel;

    void setupPlaybookTable();

    // Методы для управления темами
    void applyLightTheme();
    void applyDarkTheme();
    void applyBlueTheme();

    Theme m_currentTheme;
};

#endif // UIMANAGER_H
