package cz.moneta.test.dsl.ufo.banka.pages.loans;

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.loans.NEP001_S004_ApplicationDataPage.SAVE_BUTTON;

@Wait(value = NEP001_S004_ApplicationDataPage.NEP001_S004_PAGE_LABEL_XPATH, by = Lookup.XPATH)
@Wait(value = SAVE_BUTTON, waitSecondsForElement = 60)
public interface NEP001_S004_ApplicationDataPage extends WebFlow<NEP001_S004_ApplicationDataPage>, SharedElements {

    String NEP001_S004_PAGE_LABEL_XPATH = "//div[text()='NEP001_S004']";
    String SAVE_BUTTON = "NEP001_S004_B001";
    String INSTALMENT_DAY_SELECT = "NEP001_S004_C004";
    String INSURANCE_SELECT = "NEP001_S004_C003";
    String NO_DISABILITY_PENSION = "//label[@for='NEP001_S004_H001_1']";

    @Select(value = INSURANCE_SELECT, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    NEP001_S004_ApplicationDataPage selectInsurance(String value);

    @Click(value = NO_DISABILITY_PENSION, by = Lookup.XPATH)
    NEP001_S004_ApplicationDataPage clickNoDisabilityPension();

    @Wait(explicitWaitSeconds = 2)
    @Click(SAVE_BUTTON)
    NEP001_S004_ApplicationDataPageTransitions clickSaveButton();

}