#ifndef DIALOGEDITTRAINEE_H
#define DIALOGEDITTRAINEE_H

#include <QDialog>
#include "trainee.h"

namespace Ui {
class DialogEditTrainee;
}

class DialogEditTrainee : public QDialog
{
    Q_OBJECT

public:
    explicit DialogEditTrainee(bool adminMode, QWidget *parent = nullptr);
    ~DialogEditTrainee();

    void setTrainee(Trainee trainee);
    Trainee getTrainee();

private slots:
    void on_editName_textChanged(const QString &arg1);

    void on_editLogin_textChanged(const QString &arg1);

    void on_editPassword_textChanged(const QString &arg1);

    void on_btnOK_clicked();

    void on_btnViewPassword_pressed();

    void on_btnViewPassword_released();

    void on_btnChangePassword_clicked();

    void on_editLogin_inputRejected();

private:
    void verify();

private:
    Ui::DialogEditTrainee *ui;

    Trainee traineeInput;

    bool flNeedHashPassword;

    bool adminMode;
};

#endif // DIALOGEDITTRAINEE_H
