#ifndef ACCOUNTSETUPDIALOGLAUNCHER_H
#define ACCOUNTSETUPDIALOGLAUNCHER_H

#include <QObject>
#include "models/account.h"
#include "db/dao/accountdao.h"
#include "core/synchronizerprovider.h"
#include "core/eventbus.h"
#include "core/events.h"

class AccountSetupDialogLauncher : public QObject
{
    Q_OBJECT
public:
    explicit AccountSetupDialogLauncher(QObject *parent = nullptr);
    ~AccountSetupDialogLauncher() override = default;

    void launchSetupDialog();
    void setupAccountManually(const Account &account);

signals:
    void accountSetupStarted();
    void accountSetupCompleted(const Account &account);
    void accountSetupFailed(const QString &errorMessage);

private:
    void initializeSynchronizer(const Account &account);
};

#endif // ACCOUNTSETUPDIALOGLAUNCHER_H
