package cz.moneta.test.dsl.monetaportal.components;

import cz.moneta.test.dsl.monetaportal.mortgages.MortgagePage;
import cz.moneta.test.dsl.monetaportal.products.InvestmentFundsPage;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Until;
import cz.moneta.test.harness.support.web.Wait;

public interface NavigationBar extends MainMenu, StoreAccessor {
    String MAIN_NAVIGATION_BAR = "//nav[@class='header__main']";
    String PRODUCTS_DROPDOWN_BUTTON = MAIN_NAVIGATION_BAR + "//button/span[text()='Produkty']";
    String INVESTMENTS_FUNDS = MAIN_NAVIGATION_BAR + "//a[contains(@href,'/sporeni-a-investice/podilove-fondy')]";
    String MORTGAGE = MAIN_NAVIGATION_BAR + "//a[contains(@href,'/hypoteky/hypoteka')]";

    @Click(PRODUCTS_DROPDOWN_BUTTON)
    NavigationBar openProductsDropDown();

    @Wait(value = INVESTMENTS_FUNDS, until = Until.VISIBLE)
    @Click(INVESTMENTS_FUNDS)
    InvestmentFundsPage clickFunds();

    @Wait(value = MORTGAGE, until = Until.VISIBLE)
    @Click(MORTGAGE)
    MortgagePage clickMortgage();
}
