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

import cz.moneta.test.dsl.ufo.banka.pages.main.HKO101_S001_MainClientPage;
import cz.moneta.test.dsl.ufo.banka.pages.main.PSP004_S001_PrintPage;
import cz.moneta.test.dsl.ufo.banka.pages.search.HLO001_S001_ClientSearchPage;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.banka.pages.po.ZAS003_S001_StatutoryAuthorityEvidencePage.CONTINUE_BUTTON;
import static cz.moneta.test.dsl.ufo.banka.pages.po.ZAS003_S001_StatutoryAuthorityEvidencePage.TIS005_S001_PAGE_LABEL_XPATH;

@Wait(value = TIS005_S001_PAGE_LABEL_XPATH, by = Lookup.XPATH)
@Wait(CONTINUE_BUTTON)
public interface ZAS003_S001_StatutoryAuthorityEvidencePage extends WebFlow<ZAS003_S001_StatutoryAuthorityEvidencePage> {

    String TIS005_S001_PAGE_LABEL_XPATH = "//div[text()='ZAS003_S001']";
    String BIRTH_NUMBER_KEY = "BIRTH_NUMBER";
    String CONTINUE_BUTTON = "ZAS003_S001_B002";
    String END_BUTTON = "ZAS003_S001_B003";
    String FIRST_STATUTORY_REPRESENTATIVE_BUTTON = "ZAS003_S001_G001-0";
    String BIRTH_NUMBER_XPATH = "//table[@id='ZAS003_S001_G001_UfoTable']//td[4]";
    String SECOND_STATUTORY_REPRESENTATIVE_BUTTON = "ZAS003_S001_G001-1";

    @Click(FIRST_STATUTORY_REPRESENTATIVE_BUTTON)
    @Click(CONTINUE_BUTTON)
    PSP004_S001_PrintPage clickFirstStatutoryRepresentativeAndContinue();

    @Click(SECOND_STATUTORY_REPRESENTATIVE_BUTTON)
    ZAS003_S001_StatutoryAuthorityEvidencePage clickSecondStatutoryRepresentative();

    @Click(FIRST_STATUTORY_REPRESENTATIVE_BUTTON)
    @Click(CONTINUE_BUTTON)
    HKO101_S001_MainClientPage clickFirstStatutoryRepresentativeAndContinueToMainPage();

    @StoreElementContent(storeKey = BIRTH_NUMBER_KEY, value = BIRTH_NUMBER_XPATH, by = Lookup.XPATH)
    ZAS003_S001_StatutoryAuthorityEvidencePage storeBirthNumber();

    @Click(END_BUTTON)
    HLO001_S001_ClientSearchPage clickEnd();
}
