package cz.moneta.test.dsl.newib.savings;

import cz.moneta.test.dsl.newib.NewIbPageFlow;
import cz.moneta.test.harness.support.web.CheckElementPresent;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.newib.savings.PersonalDetailPage.TITLE_PERSONAL_DETAIL_XPATH;

@Wait(value = {TITLE_PERSONAL_DETAIL_XPATH}, waitSecondsForElement = 30)
public interface PersonalDetailPage extends NewIbPageFlow<PersonalDetailPage>  {

    String TITLE_PERSONAL_DETAIL_XPATH = "//h2[@class='t-title t-title--h4'][text()='Máme správně Vaše údaje?']";
    String TITLE_BUILDING_SAVINGS_XPATH = "//h1[@class='t-title t-title--h3 u-mb--xLarge'][text()='Stavební spoření']";
    String FIRST_NAME_LABEL_XPATH = "//label[@id='firstName_label'][text()='Jméno']";
    String LAST_NAME_LABEL_XPATH = "//label[@id='lastName_label'][text()='Příjmení']";
    String PHONE_NUMBER_LABEL_XPATH = "//label[@id='phoneNumber_label'][text()='Telefon']";
    String EMAIL_LABEL_XPATH = "//label[@id='email_label'][text()='E-mail']";
    String NATIONALITY_LABEL_XPATH = "//label[@id='nationality_label'][text()='Státní občanství']";
    String BIRTH_STATE_LABEL_XPATH = "//label[@id='birthState_label'][text()='Stát narození']";
    String BACK_BUTTON_XPATH = "//button[@data-testid='Button'][text()='Zpět']";
    String CONTINUE_BUTTON_XPATH = "//button[@data-testid='Button'][text()='Pokračovat']";

    @CheckElementPresent(TITLE_PERSONAL_DETAIL_XPATH)
    PersonalDetailPage checkTitlePersonalDetail();

    @CheckElementPresent(TITLE_BUILDING_SAVINGS_XPATH)
    PersonalDetailPage checkTitleBuildingSavings();

    @CheckElementPresent(FIRST_NAME_LABEL_XPATH)
    PersonalDetailPage checkFirstNameLabel();

    @CheckElementPresent(LAST_NAME_LABEL_XPATH)
    PersonalDetailPage checkLastNameLabel();

    @CheckElementPresent(PHONE_NUMBER_LABEL_XPATH)
    PersonalDetailPage checkPhoneNumberLabel();

    @CheckElementPresent(EMAIL_LABEL_XPATH)
    PersonalDetailPage checkEmailLabel();

    @CheckElementPresent(NATIONALITY_LABEL_XPATH)
    PersonalDetailPage checkNationalityLabel();

    @CheckElementPresent(BIRTH_STATE_LABEL_XPATH)
    PersonalDetailPage checkBirthStateLabel();

    @CheckElementPresent(BACK_BUTTON_XPATH)
    PersonalDetailPage checkBackButton();

    @Click(CONTINUE_BUTTON_XPATH)
    PersonalDetailAddressPage clickOnContinue();
}