#ifndef AGREEMENTWINDOW_H
#define AGREEMENTWINDOW_H

#include <QWidget>
#include <QTextBrowser>
#include <QPushButton>
#include <QLabel>
#include <QFile>

class AgreementWindow : public QWidget
{
    Q_OBJECT
public:
    explicit AgreementWindow(bool hideTitle,QString title,QString text,QWidget *parent = nullptr);
    bool getShowLoginPrompt();
    void initUI();

signals:
    void switchToGreeter();

protected:
    void resizeEvent(QResizeEvent *event);

protected slots:
    void switchPage();
private:
    void init();

    QTextBrowser *browser = nullptr;
    QLabel  *titleLbl = nullptr;
    QPushButton  *ensureBtn = nullptr;


    bool  m_hideTitle;
    QString m_title;
    QString m_text;

    QWidget *centerWidget = nullptr;

};

#endif // AGREEMENTWINDOW_H
