package cz.moneta.test.dsl.ufo.banka.tasks.products;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.ufo.banka.pages.main.HKO101_S001_MainClientPage;
import cz.moneta.test.dsl.ufo.banka.pages.main.codelists.HCisProductClass;

import java.util.function.Function;

public class NewSmeProductTasks {

    private final Harness harness;

    public NewSmeProductTasks(Harness harness) {
        this.harness = harness;
    }

    public Function<HKO101_S001_MainClientPage, HKO101_S001_MainClientPage> createNewSmeCurrentAccountDC() {
        return start -> start.createNewProduct(HCisProductClass.CURRENT_ACCOUNT)
                .onToNeedToUpdateCif()
                .clickNoUpdateNeededToCreateAccountPage()
                .selectAccountFlag("Konto")
                .selectAccountType("GB EXIM 100")
                .changeMfbSetting()
                .confirmCreationDispositionOwnerPage()
                .clickOwnerOnly()
                .onSignaturePatternsEditPage()
                .clickSignaturePhysical()
                .onConfirmSignaturePage()
                .clickRightButton()
                .onConfirmationPage()
                .clickConfirmed()
                .onSignerSelectionPoPage()
                .clickOkOnDispositionSignaturePage()
                .clickClientAgreedAndSignedEmpowerment()
                .checkProductNotRecommended()
                .clickWithoutRecommendationAndDismissAlertIfvisible()
                .onSuspendDispositionPrintPage()
                .clickPrintEmpowermentNow()
                .onClientFinalSignatureConfirmationPage()
                .clickClientAgreedAndSignedAll()
                .clickContinue()
                .onWantToStartExpresBusinessPage()
                .clickSkip();
    }
}
