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

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

import static cz.moneta.test.dsl.ufo.banka.pages.fop.CIF009_S001_CreateNewFoCifAsFopPartPage.*;
import static cz.moneta.test.dsl.ufo.operations.shared.SharedElements.LOAD_IMG_DIV_CLASS;

/**
 * Page visually nearly identical to CIF001_S001 and CIF011_S001
 * Page creates FO part of FOP pair
 */

@Wait(value = CIF009_S001_PAGE_LABEL_XPATH, by = Lookup.XPATH, waitSecondsForElement = 60)
@Wait(SUBMIT_BUTTON)
public interface CIF009_S001_CreateNewFoCifAsFopPartPage extends WebFlow<CIF009_S001_CreateNewFoCifAsFopPartPage> {
    String CIF009_S001_PAGE_LABEL_XPATH = "//div[text()='CIF009_S001']";

    String SUBMIT_BUTTON = "CIF009_S001_B002";

    String FIRST_OTHER_ID_SELECT = "CIF009_S001_C001";
    String MARITAL_STATUS_SELECT = "CIF009_S001_C004";
    String MATRIMONIAL_PROPERTY_LIMITED_SELECT = "CIF009_S001_C014";
    String RESIDENCY_TYPE_SELECT = "CIF009_S001_C005";
    String EDUCATION_TYPE_SELECT = "CIF009_S001_C006";
    String INCOME_TYPE_SELECT = "CIF009_S001_C007";
    String OCCUPATION_SELECT = "CIF009_S001_C016";

    String CLIENT_TITLE_INPUT = "CIF009_S001_E001";
    String FIRST_NAME_INPUT = "CIF009_S001_E002";
    String LAST_NAME_INPUT = "CIF009_S001_E004";
    String NATIONAL_ID_CARD_NUMBER_INPUT = "CIF009_S001_E007";
    String NATIONAL_ID_CARD_VALID_TO_INPUT = "CIF009_S001_E008";
    String FIRST_OTHER_ID_NUMBER_INPUT = "CIF009_S001_E009";
    String RESIDENCY_STREET_INPUT = "CIF009_S001_E010";
    String RESIDENCY_STREET_NUMBER_INPUT = "CIF009_S001_E011";
    String RESIDENCY_STREET_ORIENTATION_NUMBER_INPUT = "CIF009_S001_E012";
    String RESIDENCY_CITY_INPUT = "CIF009_S001_E013";
    String RESIDENCY_ZIP_INPUT = "CIF009_S001_E015";
    String PASSPORT_VALID_TO_INPUT = "CIF009_S001_E016";
    String FIRST_OTHER_ID_VALID_TO_INPUT = "CIF009_S001_E017";
    String EMAIL_INPUT = "CIF009_S001_E018";
    String HOME_PHONE_INPUT = "CIF009_S001_E019";
    String MOBILE_PHONE_INPUT = "CIF009_S001_E020";
    String WORK_PHONE_INPUT = "CIF009_S001_E021";
    String EMPLOYER_NAME_INPUT = "CIF009_S001_E023";
    String EMPLOYER_IC_INPUT = "CIF009_S001_E024";
    String EMPLOYER_STREET_INPUT = "CIF009_S001_E025";
    String EMPLOYER_STREET_NUMBER_INPUT = "CIF009_S001_E026";
    String EMPLOYER_STREET_ORIENTATION_NUMBER_INPUT = "CIF009_S001_E027";
    String EMPLOYER_CITY_INPUT = "CIF009_S001_E028";
    String EMPLOYER_ZIP_INPUT = "CIF009_S001_E029";
    String NET_INCOME_INPUT = "CIF009_S001_E031";
    String INCOME_CONFIRMATION_DATE = "CIF009_S001_E032";
    String EMPLOYED_SINCE_INPUT = "CIF009_S001_E030";
    String RESIDENCY_DURATION_SINCE_INPUT = "CIF009_S001_E034";
    String PASSPORT_NUMBER_INPUT = "CIF009_S001_E037";
    String RESIDENCY_CITY_DISTRICT_INPUT = "CIF009_S001_E042";
    String PLACE_OF_BIRTH_INPUT = "CIF009_S001_E059";

    String RESIDENCY_FROM_FOP_CIF_ADDRESS_CHECKBOX = "CIF009_S001_H002_1";

    String ADDRESS_LOOKUP_FLOAT_BUTTON = "CIF009_S001_P005";
    String FIRST_OTHER_ID_ISSUED_BY_CZECH_AUTHORITIES_BUTTON = "CIF009_S001_P007";
    String PASSPORT_ISSUED_BY_CZECH_AUTHORITIES_BUTTON = "CIF009_S001_P008";
    String CZECH_RESIDENCY_BUTTON = "CIF009_S001_P009";
    String BORN_IN_CZECH_REPUBLIC_BUTTON = "CIF009_S001_P010";

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

    @TypeInto(EMAIL_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillEmail(String email);

    @TypeInto(HOME_PHONE_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillHomePhone(String number);

    @TypeInto(MOBILE_PHONE_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillMobilePhone(String number);

    @TypeInto(WORK_PHONE_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillWorkPhone(String number);

    @TypeInto(EMPLOYER_NAME_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillName(String name);

    @TypeInto(EMPLOYER_IC_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillIc(String name);

    @TypeInto(EMPLOYER_STREET_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillEmployerStreet(String name);

    @TypeInto(EMPLOYER_STREET_NUMBER_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillEmployerStreetNumber(String number);

    @TypeInto(EMPLOYER_STREET_ORIENTATION_NUMBER_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillEmployerStreetOrientationNumber(String number);

    @TypeInto(EMPLOYER_CITY_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillEmployerCity(String city);

    @TypeInto(EMPLOYER_ZIP_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillEmployerZip(String zip);

    @TypeInto(NET_INCOME_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillMonthlyNetIncomeInThousands(int income);

    @TypeInto(INCOME_CONFIRMATION_DATE)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillIncomeConfirmedOn(String confirmedDate);

    @TypeInto(EMPLOYED_SINCE_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillEmployedFrom(String date);

    @TypeInto(RESIDENCY_DURATION_SINCE_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillCurrentResidencySince(String date);

    @Select(MARITAL_STATUS_SELECT)
    CIF009_S001_CreateNewFoCifAsFopPartPage selectMaritalStatus(String status);

    @Select(MATRIMONIAL_PROPERTY_LIMITED_SELECT)
    CIF009_S001_CreateNewFoCifAsFopPartPage selectLimitedMatrimonialProperty(String sjmValue);

    @Select(RESIDENCY_TYPE_SELECT)
    CIF009_S001_CreateNewFoCifAsFopPartPage selectResidencyType(String residencyType);

    @Select(EDUCATION_TYPE_SELECT)
    CIF009_S001_CreateNewFoCifAsFopPartPage selectEducationLevel(String education);

    @Select(INCOME_TYPE_SELECT)
    CIF009_S001_CreateNewFoCifAsFopPartPage selectIncomeType(String incomeType);

    @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE, waitSecondsForElement = 60)
    @Select(OCCUPATION_SELECT)
    CIF009_S001_CreateNewFoCifAsFopPartPage selectOccupation(String occupation);

    @TypeInto(CLIENT_TITLE_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillClientTitle(String title);

    @TypeInto(FIRST_NAME_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillFirstName(String firstName);

    @TypeInto(LAST_NAME_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillLastName(String lastName);

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

    @Click(BORN_IN_CZECH_REPUBLIC_BUTTON)
    CIF009_S001_CreateNewFoCifAsFopPartPage clickBornInCzechRepublic();

    @TypeInto(NATIONAL_ID_CARD_NUMBER_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillNationalIdNumber(String number);

    @TypeInto(NATIONAL_ID_CARD_VALID_TO_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillNationalIdValidity(String date);

    @TypeInto(PASSPORT_NUMBER_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillPassportNumber(String number);

    @TypeInto(PASSPORT_VALID_TO_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillPassportValidity(String date);

    @Click(PASSPORT_ISSUED_BY_CZECH_AUTHORITIES_BUTTON)
    CIF009_S001_CreateNewFoCifAsFopPartPage clickPassportIssuedByCzechAuthorities();

    @Select(FIRST_OTHER_ID_SELECT)
    CIF009_S001_CreateNewFoCifAsFopPartPage selectFirstOtherId(String text);

    @TypeInto(FIRST_OTHER_ID_NUMBER_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillFirstOtherIdNumber(String name);

    @TypeInto(FIRST_OTHER_ID_VALID_TO_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillFirstOtherIdValidity(String date);

    @Click(FIRST_OTHER_ID_ISSUED_BY_CZECH_AUTHORITIES_BUTTON)
    CIF009_S001_CreateNewFoCifAsFopPartPage clickFirstOtherIdIssuedByCzechAuthorities();

    @TypeInto(RESIDENCY_STREET_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillStreet(String name);

    @TypeInto(RESIDENCY_STREET_NUMBER_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillStreetNumber(String number);

    @TypeInto(RESIDENCY_STREET_ORIENTATION_NUMBER_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillStreetOrientationNumber(String number);

    @TypeInto(RESIDENCY_CITY_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillCity(String city);

    @TypeInto(RESIDENCY_CITY_DISTRICT_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillCityDistrict(String cityPart);

    @TypeInto(RESIDENCY_ZIP_INPUT)
    CIF009_S001_CreateNewFoCifAsFopPartPage fillZip(String zip);

    @Click(CZECH_RESIDENCY_BUTTON)
    CIF009_S001_CreateNewFoCifAsFopPartPage clickResidencyInCzechRepublic();

    @Click(RESIDENCY_FROM_FOP_CIF_ADDRESS_CHECKBOX)
    CIF009_S001_CreateNewFoCifAsFopPartPage clickCompanySeatSameAsResidency();

    @Click(ADDRESS_LOOKUP_FLOAT_BUTTON)
    CIF009_S001_CreateNewFoCifAsFopPartPage clickAddressLookupMagnifyGlass();

    @Click(UNIFIED_ADDRESS_LOOKUP_BUTTON)
    CIF009_S001_CreateNewFoCifAsFopPartPage clickDoAddressSearch();

    @Click(FIRST_FOUND_ADDRESS_BUTTON)
    CIF009_S001_CreateNewFoCifAsFopPartPage clickFirstFoundAddress();

    @Click(SUBMIT_BUTTON)
    CIF034_S001_CompanyAntiLaunderingStatement submitCif();
}
