package cz.moneta.test.dsl.util.task.auto.smartauto.customer;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.auto.smartauto.CustomerPage;

import java.util.function.Function;

public class RevenuesAndExpensesTasks {

    private final Harness harness;

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

    public Function<CustomerPage, CustomerPage> fillRevenuesAndExpenses(int netIncome, int netMonthlyHouseholdIncome, int monthlyPayments, int otherMonthlyCharges) {
        return start -> start.typeNetIncome(netIncome)
                .typeNetMonthlyHouseholdIncome(netMonthlyHouseholdIncome)
                .typeMonthlyPayments(monthlyPayments)
                .typeOtherMonthlyCharges(otherMonthlyCharges)
                .clickIncomeSource()
                .chooseIncomeSource();
    }

    public Function<CustomerPage, CustomerPage> fillRevenuesAndExpensesNoSource(int netIncome, int netMonthlyHouseholdIncome, int monthlyPayments, int otherMonthlyCharges) {
        return start -> start.typeNetIncome(netIncome)
                .typeNetMonthlyHouseholdIncome(netMonthlyHouseholdIncome)
                .typeMonthlyPayments(monthlyPayments)
                .typeOtherMonthlyCharges(otherMonthlyCharges);
    }
}
