package cz.moneta.test.dsl.exevido.tasks;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.exevido.DataBoxType;
import cz.moneta.test.dsl.exevido.ExevidoWebFlow;
import cz.moneta.test.dsl.exevido.components.ExevidoPanels;

import java.util.function.UnaryOperator;

public class SelectDataBoxTasks {

    private final Harness harness;

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

    public <P extends ExevidoWebFlow<P>> UnaryOperator<P> selectDataBoxMmbType(DataBoxType dataBoxType) {
        return start -> start
                .clickChooseDataBox()
                .clickSelectCompanyBox()
                .clickCompanyMMB()
                .clickSelectDataBox()
                .clickDataBox(dataBoxType)
                .addDataBox();
    }

    public <P extends ExevidoWebFlow<P>> UnaryOperator<P> selectDataBoxMssType(DataBoxType dataBoxType) {
        return start -> start
                .clickChooseDataBox()
                .clickSelectCompanyBox()
                .clickCompanyMSS()
                .clickSelectDataBox()
                .clickDataBox(dataBoxType)
                .addDataBox();
    }

    public <P extends ExevidoWebFlow<P>> UnaryOperator<P> selectDataBoxMssAll() {
        return start -> start
                .clickChooseDataBox()
                .clickSelectCompanyBox()
                .clickCompanyMSS()
                .addDataBox();
    }

}