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

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

import static cz.moneta.test.dsl.newib.accounts.NewForeignAccountPromoPage.*;

@Wait(value = {FOREIGN_ACCOUNT_HEADER_XPATH, FOREIGN_ACCOUNT_TITLE_XPATH, CREATE_FOREIGN_ACCOUNT_BUTTON_XPATH}, waitSecondsForElement = 30)
public interface NewForeignAccountPromoPage extends NewIbPageFlow<NewForeignAccountPromoPage>, VerticalMainMenu {
    String FOREIGN_ACCOUNT_HEADER_XPATH = "//h2[normalize-space(text())='Cizoměnový účet']";
    String FOREIGN_ACCOUNT_TITLE_XPATH = "//h3[normalize-space(text())='Vyberte si měnu Vašeho účtu']";
    String CREATE_FOREIGN_ACCOUNT_BUTTON_XPATH = "//button[@data-testid='createAccount']";
    String FOREIGN_ACCOUNT_CURRENCY_BUTTON = "//span[@class='f-control2__valueTitle']//div[@data-testid='currency-%s']";

    @CheckElementPresent(value = FOREIGN_ACCOUNT_CURRENCY_BUTTON,  isStringDynamicXpath = true)
    NewForeignAccountPromoPage checkForeignCurrencyIsPresent(String currency);
}