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

import cz.moneta.test.harness.support.web.*;
import cz.moneta.test.harness.context.StoreAccessor;

import static cz.moneta.test.dsl.ufo.operations.ufoOperations.UKO735_S001_ClaimsAndComplaints.TITLE_OF_PAGE;
import static cz.moneta.test.dsl.ufo.operations.shared.SharedElements.LOAD_IMG_DIV_CLASS;

@Wait(value = TITLE_OF_PAGE, until = Until.VISIBLE)
public interface UKO735_S001_ClaimsAndComplaints extends StoreAccessor, WebFlow<UKO735_S001_ClaimsAndComplaints> {

    String TITLE_OF_PAGE = "UKO735_S001_L001";
    String CATEGORY_COMBOBOX = "UKO735_S001_C001";
    String SUBCATEGORY_COMBOBOX = "UKO735_S001_C002";
    String TYPE_OF_TASK = "UKO735_S001_C003";
    String ASSIGN_BUTTON = "UKO735_S001_B001";
    String DONT_WANNA_RUSH_IT_CHECKBOX = "UKO735_S001_H001_1";

    @Select(value = CATEGORY_COMBOBOX, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    UKO735_S001_ClaimsAndComplaints selectCategory(int category);

    @Wait(SUBCATEGORY_COMBOBOX)
    @Select(value = SUBCATEGORY_COMBOBOX, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    UKO735_S001_ClaimsAndComplaints selectSubcategory(int subcategory);

    @Select(value = TYPE_OF_TASK, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    UKO735_S001_ClaimsAndComplaints selectTypeOfTask(int typeOfTask);

    @Click(value = ASSIGN_BUTTON, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    UKO735_S001_ClaimsAndComplaints clickAssignCategoryAndFastSolve();

    @Click(value = ASSIGN_BUTTON, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    UKO720_S001_TaskPage clickAssignCategory();

    @Click(DONT_WANNA_RUSH_IT_CHECKBOX)
    @AcceptAlert(waitSecondsForAlert = 15, expectedAlertText = "Opravdu si přejete zadat tuto reklamaci/stížnost standardní cestou (prověření provede centrální tým)?")
    UKO720_S001_TaskPage clickDontWannaRushIt();
}
