#pragma once

#include <QObject>
#include <QPair>

#include "ScreenXmlParser.h"

class HomeScreenScript final : public QObject {
    Q_OBJECT

public:
    explicit HomeScreenScript(int transactionId, QObject *parent = nullptr);

    ~HomeScreenScript() override;

public slots:
    void start();

    void stop();

signals:
    void finished();

private:
    bool m_running = true;
    int transactionId;
    ScreenXmlParser xmlScreenParser;

    bool goToHomeScreen(
        const QString &deviceId,
        const QString &packageName,
        const QString &pinCode,
        int width,
        int height
    );
};
