#ifndef TEXTPATCH_H
#define TEXTPATCH_H

#include <QObject>

#include "models/patch/patch.h"

class TextsPatch : public Patch
{
    Q_OBJECT

public:
    TextsPatch(LotroDatManager* mgr, QObject* parent = nullptr);

public slots:
    virtual void checkForUpdates() override;
    virtual void download() override;
    virtual void install() override;
    virtual void activate() override;

private slots:
    void onDownloaderProgressChanged(Downloader* ptr, Downloader::Status status);
    void onDownloaderFinished(Downloader* ptr);
    void onLotroDatManagerOperationFinished(QString operation_name, QVector<QVariant> args, bool successful);
    void onLotroDatManagerOperationStarted(QString operation_name, QVector<QVariant> args);
    void onLotroDatManagerStatusChanged(LotroDatManager::Status status);

private:
    const QStringList databases_names = {
        "text",
        "font"
    };

    quint8 elapsed_patches_to_download_ = 0; // for download process
    quint8 elapsed_databases_to_install_ = 0; // for install process
    quint8 elapsed_categories_to_activate_ = 0; // for activate/deactivate process
};
#endif // TEXTPATCH_H
