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

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.auto.smartauto.NewCalculationPage;
import cz.moneta.test.dsl.auto.smartauto.shared.Year;

import java.util.function.Function;

public class DateTasks {

    private final Harness harness;

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

    public Function<NewCalculationPage, NewCalculationPage> chooseRegistrationDate(String month) {
        return start -> start
                .clickVehicleRegistrationDate()
                .clickVehicleRegistrationMonth(month)
                .clickVehicleRegistrationDateChoose();
    }

    public Function<NewCalculationPage, NewCalculationPage> chooseRegistrationDate(Year year, String month) {
        return start -> start
                .clickVehicleRegistrationDate()
                .clickVehicleRegistrationYear(year)
                .clickVehicleRegistrationMonth(month)
                .clickVehicleRegistrationDateChoose();
    }

    public Function<NewCalculationPage, NewCalculationPage> chooseAgroDate() {
        return start -> start
                .clickAgroCalendar()
                .clickAgroToday();
    }
}
