package cz.moneta.test.dsl.ufo.banka.pages.po;

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

import static cz.moneta.test.dsl.ufo.banka.pages.po.CIF040_S001_StatutoryAuthorityPage.*;

@Wait(value = CIF040_S001_PAGE_LABEL_XPATH, by = Lookup.XPATH, waitSecondsForElement = 60)
@Wait({PAGE_TITLE_LABEL, CONTINUE_BUTTON})
public interface CIF040_S001_StatutoryAuthorityPage extends WebFlow<CIF040_S001_StatutoryAuthorityPage> {

    String CIF040_S001_PAGE_LABEL_XPATH = "//div[text()='CIF040_S001']";

    String PAGE_TITLE_LABEL = "CIF040_S001_L002";

    String FIRST_NAME_AUTHORITY_INPUT = "CIF040_S001_E001";
    String LAST_NAME_AUTHORITY_INPUT = "CIF040_S001_E002";
    String BIRTH_DATE_INPUT = "CIF040_S001_E004";

    String SELECT_BUTTON = "CIF040_S001_B001";
    String ADD_STATUTORY_AUTHORITY_BUTTON = "CIF040_S001_B002";
    String ADD_NEW_STATUTORY_AUTHORITY_BUTTON = "CIF040_S001_B003";
    String CONTINUE_BUTTON = "CIF040_S001_B004";

    String STATUTORY_AUTHORITY_FIRST_SELECT = "CIF040_S001_G001-0";
    String ADDED_STATUTORY_AUTHORITY_SELECT = "CIF040_S001_G002-0";

    String ADD_TYPE_OF_NEW_AUTHORITY_SELECT = "CIF040_S001_C001";
    String TYPE_OF_AUTHORITY_SELECT = "CIF040_S001_C002";

    String CZECH_RESIDENCY_SELECT = "CIF040_S001_P003";
    String CZECH_RESIDENCY_NEW_AUTHORITY_SELECT = "CIF040_S001_P004";

    @Click(STATUTORY_AUTHORITY_FIRST_SELECT)
    CIF040_S001_StatutoryAuthorityPage selectFirstStatutoryAuthority();

    @Click(TYPE_OF_AUTHORITY_SELECT)
    CIF040_S001_StatutoryAuthorityPage selectTypeOfAuthority(String typeOfAuthority);

    @Click(CZECH_RESIDENCY_SELECT)
    @Click(SELECT_BUTTON)
    CIF040_S001_StatutoryAuthorityPage selectCzechResidency();

    @Click(CONTINUE_BUTTON)
    @Wait(value = ADDED_STATUTORY_AUTHORITY_SELECT, by = Lookup.ID, waitSecondsForElement = 60)
    ZAS001_S001_StatutoryAuthorityPage continueToSelectStatutoryAuthority();

    @Click(ADD_STATUTORY_AUTHORITY_BUTTON)
    CIF040_S001_StatutoryAuthorityPage addStatutoryAuthority();

    @Select(ADD_TYPE_OF_NEW_AUTHORITY_SELECT)
    CIF040_S001_StatutoryAuthorityPage selectTypeOfNewAuthority(String typeOfNewAuthority);

    @TypeInto(FIRST_NAME_AUTHORITY_INPUT)
    CIF040_S001_StatutoryAuthorityPage fillFirstName(String firstName);

    @TypeInto(LAST_NAME_AUTHORITY_INPUT)
    CIF040_S001_StatutoryAuthorityPage fillLastName(String lastName);

    @TypeInto(BIRTH_DATE_INPUT)
    CIF040_S001_StatutoryAuthorityPage fillBirthDate(String birthDate);

    @Click(CZECH_RESIDENCY_NEW_AUTHORITY_SELECT)
    CIF040_S001_StatutoryAuthorityPage selectCzechResidencyOfNewAuthority();

    @Click(ADD_NEW_STATUTORY_AUTHORITY_BUTTON)
    CIF040_S001_StatutoryAuthorityPage clickSaveNewAuthority();
}
