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

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.ib.settings.ib.ediponents.ConfirmSetDiponentPage;
import cz.moneta.test.dsl.ib.welcome.WelcomePage;

import java.util.List;
import java.util.function.Function;

import static cz.moneta.test.dsl.util.task.ib.IbTasks.DEFAULT_MOBILE_KEY;

public class DisponentsRightsIbTasks {
    private final Harness harness;

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

    public Function<WelcomePage, ConfirmSetDiponentPage> mainUserSetDisponentsRights(String userNameDisponent, List<String> namesOfItemsToClickCheckboxes) {
        return start -> start.goToSettings()
                .clickToEdisponentsAdministration()
                .chooseDisponent(userNameDisponent)
                .clickToChangeSettings()
                .rightsForAccountsClicksToCheckboxes(namesOfItemsToClickCheckboxes)
                .clickToContinueButton()
                .fillInMobileKey(DEFAULT_MOBILE_KEY)
                .clickSign();
    }
}
