#include "Custom.h"

#include "minecraft/auth/steps/CustomStep.h"
#include "minecraft/auth/steps/CustomProfileStep.h"
#include "minecraft/auth/steps/GetSkinStep.h"

CustomRefresh::CustomRefresh(
    AccountData *data,
    QObject *parent
) : AuthFlow(data, parent) {
    m_steps.append(makeShared<CustomStep>(m_data, QString()));
    m_steps.append(makeShared<CustomProfileStep>(m_data));
    m_steps.append(makeShared<GetSkinStep>(m_data));
}

CustomLogin::CustomLogin(
    AccountData *data,
    QString password,
    QString url,
    QObject *parent
): AuthFlow(data, parent), m_password(password) {
    auto step = makeShared<CustomStep>(m_data, m_password);
    step.get()->setUrl(url);
    m_steps.append(step);
    m_steps.append(makeShared<CustomProfileStep>(m_data));
    m_steps.append(makeShared<GetSkinStep>(m_data));
}
