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

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

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

public interface NewCifResidency extends CIF111_S001_NewCifDataNavigation {
    String MAGNIFYING_GLASS_BUTTON = "CIF111_S001_B003";
    String CZECH_RESIDENCY_BUTTON = "CIF111_S001_B016";
    String ACCEPT_ADDRESS_BUTTON = "CIF111_S001_B026";
    String PERMANENT_RESIDENCY_COUNTRY_SELECT = "CIF111_S001_C011";
    String RESIDENCY_STREET_INPUT = "CIF111_S001_E010";
    String RESIDENCY_STREET_DESCRIPTIVE_NUMBER_INPUT = "CIF111_S001_E011";
    String RESIDENCY_STREET_ORIENTATION_NUMBER_INPUT = "CIF111_S001_E012";
    String RESIDENCY_CITY_INPUT = "CIF111_S001_E013";
    String RESIDENCY_ZIP_INPUT = "CIF111_S001_E015";
    String RESIDENCY_CITY_PART_INPUT = "CIF111_S001_E042";
    String RESIDENCY_POST_OFFICE_INPUT = "CIF111_S001_E014";
    String FIRST_FOUND_ADDRESS_RADIO = "CIF111_S001_G004-0";
    String CONTACT_ADDRESS_SAME_AS_PERMANENT_CHECKBOX = "CIF111_S001_H004_1";

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

    @TypeInto(RESIDENCY_STREET_DESCRIPTIVE_NUMBER_INPUT)
    NewCifResidency fillStreetNumber(String number);

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

    @TypeInto(value = RESIDENCY_CITY_INPUT, clear = true)
    NewCifResidency fillCity(String city);

    @TypeInto(RESIDENCY_CITY_PART_INPUT)
    NewCifResidency fillCityPart(String cityPart);

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

    @TypeInto(value = RESIDENCY_POST_OFFICE_INPUT, clear = true)
    NewCifResidency fillPostOffice(String postOffice);

    @Click(CZECH_RESIDENCY_BUTTON)
    NewCifResidency clickResidencyInCzechRepublic();

    @Select(PERMANENT_RESIDENCY_COUNTRY_SELECT)
    NewCifResidency selectPermanentResidencyCountry(String permanentResidencyCountry);

    @Click(value = CONTACT_ADDRESS_SAME_AS_PERMANENT_CHECKBOX, jsClick = true)
    NewCifResidency clickContactAddressSameAsPermanentCheckbox();

    @Click(MAGNIFYING_GLASS_BUTTON)
    NewCifResidency clickMagnifyGlassButton();

    @Click(value = FIRST_FOUND_ADDRESS_RADIO, jsClick = true)
    @Click(value = ACCEPT_ADDRESS_BUTTON, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE, waitSecondsForElement = 60))
    NewCifResidency clickFirstFoundAddress();

}