package cz.moneta.test.dsl.ib.settings.ib.contactInformation;

import cz.moneta.test.harness.support.web.CheckElementContent;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Lookup;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

import static cz.moneta.test.dsl.ib.settings.ib.contactInformation.IbSignChangedContactDataPage.DATA_TABLE;

@Wait(value = DATA_TABLE, by = Lookup.ID)
public interface IbSignChangedContactDataPage extends WebFlow<IbSignChangedContactDataPage> {
    String DATA_TABLE = "KIN801_S003_X002";

    String FIRST_NAME = "KIN801_S003_L013";
    String LAST_NAME = "KIN801_S003_L016";
    String STREET = "KIN801_S003_L017";
    String DESCRIPTIVE_NUMBER = "KIN801_S003_L018";
    String CITY = "KIN801_S003_L020";
    String POSTAL_CODE = "KIN801_S003_L021";
    String MOBILE_NUMBER = "KIN801_S003_L026";
    String EMAIL = "KIN801_S003_L027";

    String MOBILE_KEY_INPUT = "KIN801_S003_E001";
    String SEND_BUTTON = "KIN801_S003_P004";

    @Wait(value = FIRST_NAME, by = Lookup.ID)
    @CheckElementContent(value = FIRST_NAME, by = Lookup.ID)
    IbSignChangedContactDataPage checkFirstName(String firstName);

    @Wait(value = LAST_NAME, by = Lookup.ID)
    @CheckElementContent(value = LAST_NAME, by = Lookup.ID)
    IbSignChangedContactDataPage checkLastName(String lastName);

    @Wait(value = STREET, by = Lookup.ID)
    @CheckElementContent(value = STREET, by = Lookup.ID)
    IbSignChangedContactDataPage checkStreet(String street);

    @Wait(value = DESCRIPTIVE_NUMBER, by = Lookup.ID)
    @CheckElementContent(value = DESCRIPTIVE_NUMBER, by = Lookup.ID)
    IbSignChangedContactDataPage checkDescriptiveNumber(String descriptiveNumber);

    @Wait(value = CITY, by = Lookup.ID)
    @CheckElementContent(value = CITY, by = Lookup.ID)
    IbSignChangedContactDataPage checkCity(String city);

    @Wait(value = POSTAL_CODE, by = Lookup.ID)
    @CheckElementContent(value = POSTAL_CODE, by = Lookup.ID)
    IbSignChangedContactDataPage checkPostalCode(String postalCode);

    @Wait(value = MOBILE_NUMBER, by = Lookup.ID)
    @CheckElementContent(value = MOBILE_NUMBER, by = Lookup.ID)
    IbSignChangedContactDataPage checkMobileNumber(String mobileNumber);

    @Wait(value = EMAIL, by = Lookup.ID)
    @CheckElementContent(value = EMAIL, by = Lookup.ID)
    IbSignChangedContactDataPage checkEmail(String email);

    @Wait(value = {MOBILE_KEY_INPUT, SEND_BUTTON}, by = Lookup.ID)
    @TypeInto(value = MOBILE_KEY_INPUT, by = Lookup.ID)
    @Click(value = SEND_BUTTON, by = Lookup.ID)
    IbSignedOfChangeContactDataPage typeMobileKeyAndSendRequest(String mobileKey);

}
