#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "widgets/framelessbase.h"
#include "MainPanel.h"

class QHBoxLayout;
class QStackedWidget;
class MeetingSelectionWidget;
class JoinMeetingDialog;
class CreateMeetingDialog;

class MainWindow : public TMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void createMainWindow();

private:
    void onLoginSuccess(const QString &username, const QString &password);
    void authLogin();
    void checkRoom(MainPanel *target, const QString &meetingId = QString());
    void showMeetingSelection();
    void onJoinMeetingRequested();
    void onCreateMeetingRequested();
    void onMeetingSelectionLogout();

    QVBoxLayout *layout;
    class LoginWidget *loginWidget;
    MainPanel *mainWidget;
    MeetingSelectionWidget *meetingSelectionWidget;

    QStackedWidget *stackedWidget;
};
#endif // MAINWINDOW_H
