package cz.moneta.test.dsl.ufo.banka.pages.products.debit.card;

import cz.moneta.test.dsl.ufo.banka.pages.fon.CIF113_S001_ChangeDataFO;
import cz.moneta.test.dsl.ufo.operations.shared.SharedElements;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.banka.pages.products.debit.card.NPK012_S001_DebitCardHolderSelectPage.NPK012_S001_PAGE_LABEL_XPATH;
import static cz.moneta.test.dsl.ufo.banka.pages.products.debit.card.NPK012_S001_DebitCardHolderSelectPage.BACK_BUTTON;
import static cz.moneta.test.dsl.ufo.operations.shared.SharedElements.LOAD_IMG_DIV_CLASS;

@Wait(value = NPK012_S001_PAGE_LABEL_XPATH, by = Lookup.XPATH)
@Wait(BACK_BUTTON)
@Wait(value = LOAD_IMG_DIV_CLASS, until = Until.GONE, by = Lookup.CLASSNAME)
public interface NPK012_S001_DebitCardHolderSelectPage extends WebFlow<NPK012_S001_DebitCardHolderSelectPage>, SharedElements {
    String NPK012_S001_PAGE_LABEL_XPATH = "//div[text()='NPK012_S001']";
    String PREFIX = "NPK012_S001_";

    String BACK_BUTTON = PREFIX + "B005";
    String STATUTORY_AUTHORITY_BIRTH_NUMBER_XPATH = "//table[@id='NPK012_S001_G001_UfoTable']//tr[1]//td[3]";
    String SELECT_BUTTON = PREFIX + "G001-0";

    @StoreElementContent(storeKey = "STAT_AUTH_BIRTH_NUM", value = STATUTORY_AUTHORITY_BIRTH_NUMBER_XPATH)
    NPK012_S001_DebitCardHolderSelectPage storeBirthNumber();

    @Click(SELECT_BUTTON)
    CIF113_S001_ChangeDataFO clickSelect();
}
