package cz.moneta.test.dsl.ufo.ufoframework.pages.otherjarda;

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

import static cz.moneta.test.dsl.ufo.ufoframework.pages.otherjarda.ValidationValueTypesPanel.PAGE_LABEL_XPATH;

@Wait(value = PAGE_LABEL_XPATH, by = Lookup.XPATH)
public interface ValidationValueTypesPanel extends REL909_S001_OtherJardaPage {

    String PAGE_LABEL_XPATH = "//div[@id='REL909_S001_L015' and text()='HCisloUctu']";
    String H_ACCOUNT_NUMBER_INPUT = "REL909_S001_E009";
    String H_ACCOUNT_NUMBER_VALIDATE_BUTTON = "REL909_S001_B015";
    String H_EMAIL_INPUT = "REL909_S001_E010";
    String H_EMAIL_VALIDATION_BUTTON = "REL909_S001_B016";
    String H_DATE_INPUT = "REL909_S001_E011";
    String H_DATE_VALIDATE_BUTTON = "REL909_S001_B017";
    String H_BIRTH_NUMBER_INPUT = "REL909_S001_E012";
    String H_BIRTH_NUMBER_VALIDATE_BUTTON = "REL909_S001_B018";
    String H_ICO_INPUT = "REL909_S001_E013";
    String H_ICO_VALIDATE_BUTTON = "REL909_S001_B019";
    String H_FULL_NAME_INPUT = "REL909_S001_E015";
    String H_FULL_NAME_VALIDATE_BUTTON = "REL909_S001_B020";
    String VALIDATION_LABEL = "REL909_S001_L025";

    @CheckElementContent(VALIDATION_LABEL)
    ValidationValueTypesPanel checkValidationIsSuccessful(String expectedValidationValue);

    @TypeInto(value = H_ACCOUNT_NUMBER_INPUT, clear = true)
    ValidationValueTypesPanel fillHAccountNumber(String hAccountNumber);

    @Click(H_ACCOUNT_NUMBER_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Přichod validace HCisloUctu ")
    ValidationValueTypesPanel clickHAccountNumberValidateAndAcceptValidAlert();

    @Click(H_ACCOUNT_NUMBER_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Číslo účtu není ve správném formátu ! [REL909_S001_E009]")
    ValidationValueTypesPanel clickHAccountNumberValidateAndAcceptNotValidAlert();

    @TypeInto(value = H_EMAIL_INPUT, clear = true)
    ValidationValueTypesPanel fillHEmail(String hEmail);

    @Click(H_EMAIL_VALIDATION_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Přichod validace HEmail ")
    ValidationValueTypesPanel clickHEmailValidateAndAcceptValidAlert();

    @Click(H_EMAIL_VALIDATION_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "E-mail není ve správném formátu ! [REL909_S001_E010]")
    ValidationValueTypesPanel clickHEmailValidateAndAcceptNotValidAlert();

    @TypeInto(value = H_DATE_INPUT, clear = true)
    ValidationValueTypesPanel fillHDate(String hDate);

    @Click(H_DATE_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Přichod validace HDatum")
    ValidationValueTypesPanel clickHDateValidateAndAcceptValidAlert();

    @Click(H_DATE_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Je nutné zadat datum ve formátu dd.mm.yyyy ! [REL909_S001_E011]")
    ValidationValueTypesPanel clickHDateValidateAndAcceptNotValidAlert();

    @TypeInto(value = H_BIRTH_NUMBER_INPUT, clear = true)
    ValidationValueTypesPanel fillHBirthNumber(String hBirthNumber);

    @Click(H_BIRTH_NUMBER_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Přichod validace HRodneCislo")
    ValidationValueTypesPanel clickHBirthNumberValidateAndAcceptValidAlert();

    @Click(H_BIRTH_NUMBER_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Rodné číslo není ve správném formátu ! [REL909_S001_E012]")
    ValidationValueTypesPanel clickHBirthNumberValidateAndAcceptNotValidAlert();

    @TypeInto(value = H_ICO_INPUT, clear = true)
    ValidationValueTypesPanel fillHIco(String hIco);

    @Click(H_ICO_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Přichod validace HICO ")
    ValidationValueTypesPanel clickHIcoValidateAndAcceptValidAlert();

    @Click(H_ICO_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "IČO není ve správném formátu ! [REL909_S001_E013]")
    ValidationValueTypesPanel clickHIcoValidateAndAcceptNotValidAlert();

    @TypeInto(value = H_FULL_NAME_INPUT, clear = true)
    ValidationValueTypesPanel fillHFullName(String hFullName);

    @Click(H_FULL_NAME_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "Přichod validace HJmenoPrijmeni ")
    ValidationValueTypesPanel clickHFullNameValidateAndAcceptValidAlert();

    @Click(H_FULL_NAME_VALIDATE_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 3, expectedAlertText = "V textovém poli se nesmí vyskytovat číslice a mezery na začátku i konci textu. [REL909_S001_E015]")
    ValidationValueTypesPanel clickHFullNameValidateAndAcceptNotValidAlert();

}
