#ifndef LOGINWINDOW_H
#define LOGINWINDOW_H

#include <QMessageBox>
#include <QMovie>
#include <QNetworkAccessManager>
#include <QTimer>
#include <QWidget>

#include "../global.h"
#include "../mainwindow.h"
#include "../registryManager/registrymanager.h"

namespace Ui {
class LoginWindow;
}

class LoginWindow : public QWidget {
    Q_OBJECT

   public:
    explicit LoginWindow(QWidget *parent = nullptr);
    ~LoginWindow();

   protected:
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;

   private slots:
    void on_btnLogin_clicked();

    void on_btnClose_clicked();

    void on_btnMin_clicked();

    void on_username_activated(int index);

    void on_username_currentIndexChanged(int index);

   private:
    void initUesrCombox();

   private:
    Ui::LoginWindow *ui;
    QNetworkAccessManager *manager;
    QPoint m_dragPosition;
};

#endif  // LOGINWINDOW_H
