package cz.moneta.test.dsl.util.task.monetaportal;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.monetaportal.components.forms.AlaCarteLoanForm;

import java.util.function.Function;

public class FormTasks {

    private final Harness harness;

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

    public Function<AlaCarteLoanForm, AlaCarteLoanForm> fillOnboardingForm(String clientFirstName, String clientLastName, String clientEmail, String phoneNumber) {
        return start -> start
                .fillLoanFormFirstname(clientFirstName)
                .fillLoanFormLastname(clientLastName)
                .fillLoanFormEmail(clientEmail)
                .fillLoanFormPhoneNumber(phoneNumber)
                .clickLoanFormMailingAgreement()
                .clickLoanFormGdprAgreement()
                .clickLoanFormWhatsAppAgreement()
                .clickLoanFormConfirm()
                .checkQRCode();
    }
}
