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

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.brokerportal.contract.CalculatorPage;
import cz.moneta.test.dsl.brokerportal.components.Menu;
import cz.moneta.test.dsl.brokerportal.userprofile.UserProfilePage;

import static cz.moneta.test.dsl.brokerportal.enums.Product.*;

import java.util.function.Function;

public class MenuTasks {
    private final Harness harness;

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

    public Function<Menu, CalculatorPage> selectProductMortgage() {
        return start -> start.disableNewVersion()
                .clickProductsButton()
                .clickProductMortgageButton(MORTGAGE);
    }

    public Function<Menu, UserProfilePage> clickProfileSettings() {
        return start -> start.clickUserProfileButton()
                .clickUserProfileSettingsButton();
    }
}