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

import cz.moneta.test.dsl.ufo.banka.pages.common.pages.AML002_S001_AmlSurveyPage;
import cz.moneta.test.dsl.ufo.operations.shared.SharedElements;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.banka.pages.fon.CIF009_S002_PersonalDataFON.PAGE_LABEL_DIV;

@Wait(value = PAGE_LABEL_DIV, by = Lookup.XPATH)
public interface CIF009_S002_PersonalDataFON extends WebFlow<CIF009_S002_PersonalDataFON> {

    String PAGE_LABEL_DIV = "//div[text()='CIF009_S002']";
    String BIRHT_PLACE_INPUT = "CIF009_S002_E006";
    String CZECH_BIRTH_COUNTRY_BUTTON = "CIF009_S002_B004";
    String CZECH_NATIONALITY_BUTTON = "CIF009_S002_B005";
    String ADDRESS_MAGNIFYING_GLASS_BUTTON = "CIF009_S002_B017";
    String ADDRESS_SEARCH_FIELD_INPUT = "CIF009_S002_E021";
    String ADDRESS_SEARCH_BUTTON = "CIF009_S002_B006";
    String FIRST_FOUND_ADDRESS_RADIO = "CIF009_S002_G001-0";
    String SELECT_ADDRESS_BUTTON = "CIF009_S002_B007";
    String CZECH_COUNTRY_BUTTON = "CIF009_S002_B018";
    String ID_NUMBER_INPUT = "CIF009_S002_E008";
    String VALID_UNTIL_INPUT = "CIF009_S002_E009";
    String OTHER_IDENTIFICATION_DOCUMENT_DIV = "CIF009_S002_L048";
    String OTHER_IDENTIFICATION_DOCUMENT_TYPE_SELECT = "CIF009_S002_C002";
    String OTHER_IDENTIFICATION_DOCUMENT_NUMBER_INPUT = "CIF009_S002_E010";
    String OTHER_IDENTIFICATION_DOCUMENT_VALID_UNTIL_INPUT = "CIF009_S002_E011";
    String OTHER_IDENTIFICATION_DOCUMENT_CZECH_COUNTRY_BUTTON = "CIF009_S002_B002";
    String EMAIl_INPUT = "CIF009_S002_E018";
    String MOBILE_PHONE_INPUT = "CIF009_S002_E033";
    String HOME_NUMBER_INPUT = "CIF009_S002_E036";
    String CONTINUE_BUTTON = "CIF009_S002_B008";
    String NOT_POLITICALLY_EXPOSED_PERSON_RADIO = "CIF009_S002_R002_0";
    String EDUCATION_SELECT = "CIF009_S002_C013";
    String DEPENDENT_PERSON_COUNT_INPUT = "CIF009_S002_E017";
    String MARRIAGE_STATUS_SELECT = "CIF009_S002_C014";
    String HOUSING_TYPE_SELECT = "CIF009_S002_C016";
    String LIVING_ON_ADDRESS_FROM_INPUT = "CIF009_S002_E024";
    String RELATIONSHIP_WITH_BANK_SELECT = "CIF009_S002_C017";

    @TypeInto(BIRHT_PLACE_INPUT)
    CIF009_S002_PersonalDataFON fillBirthPlace(String birthPlace);

    @Click(CZECH_BIRTH_COUNTRY_BUTTON)
    CIF009_S002_PersonalDataFON clickCzechBirthCountry();

    @Click(CZECH_NATIONALITY_BUTTON)
    CIF009_S002_PersonalDataFON clickCzechNationality();

    @Click(value = ADDRESS_MAGNIFYING_GLASS_BUTTON, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    CIF009_S002_PersonalDataFON clickAddressMagnifyingGlass();

    @TypeInto(ADDRESS_SEARCH_FIELD_INPUT)
    CIF009_S002_PersonalDataFON fillAddressSearchField(String address);

    @Click(value = ADDRESS_SEARCH_BUTTON, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    CIF009_S002_PersonalDataFON clickAddressSearch();

    @Click(value = FIRST_FOUND_ADDRESS_RADIO, jsClick = true, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    CIF009_S002_PersonalDataFON clickFirstFoundAddress();

    @Click(value = SELECT_ADDRESS_BUTTON, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    CIF009_S002_PersonalDataFON clickSelectAddress();

    @Click(CZECH_COUNTRY_BUTTON)
    CIF009_S002_PersonalDataFON clickCzechCountry();

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

    @Click(value = OTHER_IDENTIFICATION_DOCUMENT_DIV, andWait = @Wait(value = OTHER_IDENTIFICATION_DOCUMENT_TYPE_SELECT, until = Until.VISIBLE))
    CIF009_S002_PersonalDataFON clickOtherIdentificationDocument();

    @Select(OTHER_IDENTIFICATION_DOCUMENT_TYPE_SELECT)
    CIF009_S002_PersonalDataFON selectOtherIdentificationDocumentType(String otherIdentificationDocumentType);

    @TypeInto(OTHER_IDENTIFICATION_DOCUMENT_NUMBER_INPUT)
    CIF009_S002_PersonalDataFON fillOtherIdentificationDocumentNumber(String otherIdentificationDocumentNumber);

    @TypeInto(OTHER_IDENTIFICATION_DOCUMENT_VALID_UNTIL_INPUT)
    CIF009_S002_PersonalDataFON fillOtherIdentificationDocumentValidUntil(String otherIdentificationDocumentValidUntil);

    @Click(OTHER_IDENTIFICATION_DOCUMENT_CZECH_COUNTRY_BUTTON)
    CIF009_S002_PersonalDataFON clickOtherIdentificationDocumentCzechCountry();

    @TypeInto(EMAIl_INPUT)
    CIF009_S002_PersonalDataFON fillEmail(String email);

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

    @TypeInto(HOME_NUMBER_INPUT)
    CIF009_S002_PersonalDataFON fillHomeNumber(String homeNumber);

    @TypeInto(VALID_UNTIL_INPUT)
    CIF009_S002_PersonalDataFON fillValidUntil(String validUntil);

    @Click(value = NOT_POLITICALLY_EXPOSED_PERSON_RADIO, jsClick = true, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    CIF009_S002_PersonalDataFON clickNotPoliticallyExposedPerson();

    @Select(EDUCATION_SELECT)
    CIF009_S002_PersonalDataFON selectEducation(String education);

    @TypeInto(DEPENDENT_PERSON_COUNT_INPUT)
    CIF009_S002_PersonalDataFON fillDependentPersonCount(String dependentPersonCount);

    @Select(MARRIAGE_STATUS_SELECT)
    CIF009_S002_PersonalDataFON selectMarriageStatus(String marriage);

    @Select(HOUSING_TYPE_SELECT)
    CIF009_S002_PersonalDataFON selectHousingType(String housingType);

    @TypeInto(LIVING_ON_ADDRESS_FROM_INPUT)
    CIF009_S002_PersonalDataFON fillLivingOnAddressFrom(String livingOnAddressFrom);

    @Select(RELATIONSHIP_WITH_BANK_SELECT)
    CIF009_S002_PersonalDataFON selectRelationshipWithBank(String RelationshipWithBank);

    @Click(CONTINUE_BUTTON)
    AML002_S001_AmlSurveyPage clickContinue();

}
