package cz.moneta.test.dsl.newib.settings.workingonproduct;

import cz.moneta.test.dsl.newib.NewIbPageFlow;
import cz.moneta.test.dsl.newib.settings.SettingsModalPage;
import cz.moneta.test.harness.support.web.CheckElementPresent;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.newib.settings.workingonproduct.WorkingModalPage.CLOSE_MODAL_BTN_XPATH;
import static cz.moneta.test.dsl.newib.settings.workingonproduct.WorkingModalPage.MODAL_TITLE_XPATH;

@Wait(value = {MODAL_TITLE_XPATH, CLOSE_MODAL_BTN_XPATH}, waitSecondsForElement = 30)
public interface WorkingModalPage extends NewIbPageFlow<WorkingModalPage> {
    String MODAL_TITLE_XPATH = "//h2[@class='t-title t-title--h3 c-modal__title'][text()='Na této funkci pracujeme']";
    String MODAL_TEXT_XPATH = "//div[@class='c-modal__body'][text()='Až bude připravená, dáme Vám vědět.']";
    String CLOSE_MODAL_BTN_XPATH = "//button[@data-testid='decline-redirect-button']";

    @CheckElementPresent(MODAL_TITLE_XPATH)
    WorkingModalPage checkModalTitleIsPresent();

    @CheckElementPresent(MODAL_TEXT_XPATH)
    WorkingModalPage checkModalTextIsPresent();

    @Click(CLOSE_MODAL_BTN_XPATH)
    SettingsModalPage clickOnDecline();
}