#ifndef BASE_NOTIFY_DIALOG_H
#define BASE_NOTIFY_DIALOG_H

#include <QDialog>
#include <QMovie>
#include <QIcon>
#include <QTimer>
#include "custom_label.h"
namespace Ui {
class BaseNotifyDialog;
}

enum class BaseNotifyDialogType : int{
    WAITTING = 0,
    WARNING,
    ERROR,
    SUCCEED,
};

class BaseNotifyDialog : public QDialog
{
    Q_OBJECT

public:
    explicit BaseNotifyDialog(QWidget *parent = nullptr);
    ~BaseNotifyDialog();
    void dialogSetType(BaseNotifyDialogType);
    void labelSetText(QString text);
    void showThis();

signals:
    void closeThis();
private slots:
    void gifPlay();
private:
    Ui::BaseNotifyDialog *m_ui;

    void setMovieDialog();
    int m_count = 0;
    QTimer *m_timer;
    QIcon *m_loadingIcon;
};

#endif // BASE_NOTIFY_DIALOG_H
