#ifndef ENTRYWIDGET_H
#define ENTRYWIDGET_H

#include <QWidget>
#include <Data/Datas.h>

namespace Ui {
class EntryWidget;
}

class EntryWidget : public QWidget
{
    Q_OBJECT

public:
    explicit EntryWidget(QWidget *parent = nullptr);
    ~EntryWidget();
    void initialize();
    void settingsState();
    void showLoginWidget(bool flag);

    void disconnectState();
    void fillSettings(ServerSettings *settings);
    void isActive(bool flag);
    bool getLoginWidgetIsHidden();

    ServerSettings *getServerSettings();
    ClientAutorization* getAuthData();

signals:
    void sigTryLogin();
    void sigSaveServerSettings();

private slots:
    void on_loginButton_clicked();
    void on_saveServerButton_clicked();

private:
    Ui::EntryWidget *ui;
};

#endif // ENTRYWIDGET_H
