package cz.moneta.test.dsl.monetaportal;

import cz.moneta.test.dsl.monetaportal.components.Web2Branch;
import cz.moneta.test.dsl.monetaportal.components.Web2Call;
import cz.moneta.test.dsl.monetaportal.more.*;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.monetaportal.HomePageEN.HOMEPAGEEN_EXCHANGE_RATES_TABLE;

@Wait(HOMEPAGEEN_EXCHANGE_RATES_TABLE)
public interface HomePageEN extends WebFlow<HomePageEN>, StoreAccessor {

    //HomepageEN
    String HOMEPAGEEN_ACCEPT_COOKIES_BUTTON = "//button[@id = 'onetrust-accept-btn-handler']";
    String HOMEPAGEEN_W2C_LINK = "//a[@class='f-contact-bar-item w2c-modal']";
    String HOMEPAGEEN_W2B_LINK = "//a[@class='f-contact-bar-item w2b-modal']";
    String HOMEPAGEEN_EXCHANGE_RATES_TABLE = "//section[contains(@id, 'portlet_ExchangeRatesTable_')]";
    String HOMEPAGEEN_EXCHANGE_RATES_TABLE_MORE_BUTTON = "//section[contains(@id, 'portlet_ExchangeRatesTable_INSTANCE_')]//span[@data-message-id='FilterTabs.moreCurrencies']";

    @Click(HOMEPAGEEN_ACCEPT_COOKIES_BUTTON)
    HomePageEN clickAcceptCookies();

    @Click(HOMEPAGEEN_W2C_LINK)
    Web2Call clickHomePageW2C();

    @Click(HOMEPAGEEN_W2B_LINK)
    Web2Branch clickHomePageW2B();

    @CheckElementPresent(HOMEPAGEEN_EXCHANGE_RATES_TABLE)
    HomePageEN checkHomePageExchangeRatesTable();

    @Click(HOMEPAGEEN_EXCHANGE_RATES_TABLE_MORE_BUTTON)
    ExchangeRatesPageEN clickExchangeRatesTableMore();
}