#ifndef ENTRYWIDGET_H
#define ENTRYWIDGET_H

#include "Datas.h"
#include "mainwindow.h"

#include <QWidget>

namespace Ui {
class EntryWidget;
}

class EntryWidget : public QWidget
{
    Q_OBJECT

public:
    explicit EntryWidget(QWidget *parent = nullptr);
    void initialize(MainWindow *mainWindow);
    void connectionEmptyState();
    void settingsState();
    bool isLoginFieldsFill();
    ClientAutorization* getAuthData();
    ServerSettings* getServerSettings();
    void loginIsActive(bool flag);
    void settingsWidgetIsActive(bool flag);
    void fillSettings(ServerSettings *settings);
    ~EntryWidget();

private slots:
    void on_loginButton_clicked();

    void on_saveServerButton_clicked();

private:
    Ui::EntryWidget *ui;
    MainWindow *mainWindow;
};

#endif // ENTRYWIDGET_H
