package cz.moneta.test.dsl.ufo.banka.pages.main.client.settings;

import cz.moneta.test.dsl.ufo.banka.pages.fon.SCN001_S001_IdDocumentsCopy;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.banka.pages.main.client.settings.ODS005_S001_FoEditingPage.*;

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

    String ODS005_S001_PAGE_LABEL_XPATH = "//div[text()='ODS005_S001']";

    String PAGE_TITLE_LABEL = "ODS005_S001_L024";

    String PLACE_OF_BIRTH_INPUT = "ODS005_S001_E005";
    String BIRTH_NUMBER_INPUT = "ODS005_S001_E007";
    String ID_NUMBER_INPUT = "ODS005_S001_E008";
    String ID_VALIDITY_INPUT = "ODS005_S001_E009";
    String STREET_INPUT = "ODS005_S001_E010";
    String DESCRIPTIVE_NUMBER_INPUT = "ODS005_S001_E011";
    String CITY_NAME_INPUT = "ODS005_S001_E013";
    String ZIP_CODE_INPUT = "ODS005_S001_E014";
    String MOBILE_PHONE_INPUT = "ODS005_S001_E022";
    String MOBILE_PHONE_CODE_INPUT = "ODS005_S001_E023";

    String UNIFIED_ADDRESS_LOOKUP_BUTTON = "XXX000_T001_B100";
    String FIRST_FOUND_ADDRESS_BUTTON = "XXX000_T001_G100-0";

    String ID_TYPE_SELECT = "ODS005_S001_C002";
    String PERSON_PHYSICALLY_ONSITE_SELECT = "ODS005_S001_C005";

    String GENDER_MALE_RADIO = "ODS005_S001_R001_1";
    String GENDER_FEMALE_RADIO = "ODS005_S001_R001_2";
    String POLITICALLY_EXPOSED_PERSON = "ODS005_S001_R002_0";

    String ADDRESS_LOOKUP_FLOAT_BUTTON = "ODS005_S001_P001";
    String ID_COUNTRY_RELEASE_BUTTON = "ODS005_S001_P002";
    String COUNTRY_IN_ADDRESS_BUTTON = "ODS005_S001_P003";
    String CZECH_RESIDENCY_BUTTON = "ODS005_S001_P004";
    String CZECH_COUNTRY_OF_BIRTH_BUTTON = "ODS005_S001_P005";

    String CONTINUE_BUTTON = "ODS005_S001_B001";

    @TypeInto(BIRTH_NUMBER_INPUT)
    ODS005_S001_FoEditingPage fillBirthNumber(String birthNumber);

    @TypeInto(STREET_INPUT)
    ODS005_S001_FoEditingPage fillStreet(String street);

    @TypeInto(DESCRIPTIVE_NUMBER_INPUT)
    ODS005_S001_FoEditingPage fillDescriptiveNumber(String descriptiveNumber);

    @TypeInto(CITY_NAME_INPUT)
    ODS005_S001_FoEditingPage fillCityName(String cityName);

    @TypeInto(ZIP_CODE_INPUT)
    ODS005_S001_FoEditingPage fillZipCode(String zipCode);

    @TypeInto(ID_NUMBER_INPUT)
    ODS005_S001_FoEditingPage fillIdNumber(String idNumber);

    @TypeInto(ID_VALIDITY_INPUT)
    ODS005_S001_FoEditingPage fillIdValidTill(String idValidTill);

    @TypeInto(PLACE_OF_BIRTH_INPUT)
    ODS005_S001_FoEditingPage fillPlaceOfBirth(String placeOfBirth);

    @TypeInto(MOBILE_PHONE_INPUT)
    ODS005_S001_FoEditingPage fillMobilePhone(String mobilePhone);

    @TypeInto(MOBILE_PHONE_CODE_INPUT)
    ODS005_S001_FoEditingPage fillMobilePhoneCode(String mobilePhoneCode);

    @Select(PERSON_PHYSICALLY_ONSITE_SELECT)
    ODS005_S001_FoEditingPage clickPersonPhysicallyOnsite(String personPhysicallyOnsite);

    @Click(ID_COUNTRY_RELEASE_BUTTON)
    ODS005_S001_FoEditingPage clickCzechCountryIdReleaseButton();

    @Select(ID_TYPE_SELECT)
    ODS005_S001_FoEditingPage selectIdType(String idType);

    @Click(COUNTRY_IN_ADDRESS_BUTTON)
    ODS005_S001_FoEditingPage clickCzechCountryAddress();

    @Click(GENDER_MALE_RADIO)
    ODS005_S001_FoEditingPage clickGenderMaleRadio();

    @Click(GENDER_FEMALE_RADIO)
    ODS005_S001_FoEditingPage clickGenderFemaleRadio();

    @Click(CZECH_RESIDENCY_BUTTON)
    ODS005_S001_FoEditingPage clickCzechResidencyButton();

    @Click(CZECH_COUNTRY_OF_BIRTH_BUTTON)
    ODS005_S001_FoEditingPage clickCzechCountryOfBirthButton();

    @Click(ADDRESS_LOOKUP_FLOAT_BUTTON)
    ODS005_S001_FoEditingPage clickAddressLookupMagnifyGlass();

    @Click(value = UNIFIED_ADDRESS_LOOKUP_BUTTON, andWait = @Wait(value = FIRST_FOUND_ADDRESS_BUTTON, by = Lookup.ID, until = Until.VISIBLE))
    ODS005_S001_FoEditingPage clickDoAddressSearch();

    @Click(FIRST_FOUND_ADDRESS_BUTTON)
    ODS005_S001_FoEditingPage clickFirstFoundAddress();

    @Click(POLITICALLY_EXPOSED_PERSON)
    ODS005_S001_FoEditingPage chooseNotPoliticallyExposedPerson();

    @Click(CONTINUE_BUTTON)
    SCN001_S001_IdDocumentsCopy clickContinue();

}
