package cz.moneta.test.dsl.ufo.operations.ufoOperations.taskslist;

public enum StateOfTaskFilter {
    NEW("new"),
    ASSIGNED("assigned"),
    ASSIGNING("assigning"),
    RETURNED("returned"),
    IN_SOLVING("solvingTask"),
    TASK_IN_ACCEPTATION_WORKFLOW("Approving"),
    ERROR_CORRECTING_DATA("correcting data"),
    PROCESSED_UNAUTHORIZED("processedWithVerification"),
    PROCESSED("processedWithoutVerification"),
    PROCESSED_AUTHORIZED("solvedWithVerification"),
    CANCELED("calledOff"),
    WAITING("waiting");

    private final String checkboxIdXpath = "//input[starts-with(@id, 'UKO720_S001_G002') and @value='%s']";
    private final String value;

    StateOfTaskFilter(String value) {
        this.value = value;
    }

    public String getElementXpath() {
        return String.format(checkboxIdXpath, value);
    }

    public String getValue() {
        return value;
    }
}