package cz.moneta.test.dsl.ib.account.saving;

import cz.moneta.test.dsl.ib.IbPageFlow;
import cz.moneta.test.dsl.ib.components.MainMenu;
import cz.moneta.test.dsl.ib.components.SavingMenu;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Select;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.ib.account.saving.NewSavingAccountEnteringPage.PAGE_XPATH;
import static cz.moneta.test.dsl.ib.account.saving.NewSavingAccountEnteringPage.FIRST_STEP_IN_PROGRESS_IMG;

@Wait({PAGE_XPATH, FIRST_STEP_IN_PROGRESS_IMG})
public interface NewSavingAccountEnteringPage extends IbPageFlow<NewSavingAccountEnteringPage>, MainMenu, SavingMenu {
    String PAGE_XPATH = "//img[@alt='Nový spoříci účet']";
    String FIRST_STEP_IN_PROGRESS_IMG = "//img[@src='images_new/top_step1.gif']";
    String INPUT_ACCOUNT_NAME = "//input[@id='accountName']";
    String TAX_JURISDICTION_MENU = "//select[@id='zeme_1']";
    String CHECKBOX_PRECONTRACTUAL_INFORMATION = "//input[@name='prvaP']";
    String CHECKBOX_PRODUCTION_CONDITIONS = "//input[@name='druhaP']";
    String CONTINUE_BUTTON = "//img[@alt='Pokračovat']";

    @TypeInto(INPUT_ACCOUNT_NAME)
    NewSavingAccountEnteringPage fillInAccountName(String fillYourAccountName);

    @Select(TAX_JURISDICTION_MENU)
    NewSavingAccountEnteringPage selectTaxJurisdiction(String taxJurisdiction);

    @Click(CHECKBOX_PRECONTRACTUAL_INFORMATION)
    NewSavingAccountEnteringPage confirmCheckPrecontractualInformation();

    @Click(CHECKBOX_PRODUCTION_CONDITIONS)
    NewSavingAccountEnteringPage confirmCheckProductionConditions();

    @Click(CONTINUE_BUTTON)
    NewSavingAccountCheckPage clickToContinueButton();
}