package cz.moneta.test.dsl.ufo.banka.pages.main.signature.patterns;

import cz.moneta.test.harness.support.web.CheckElementPresent;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Lookup;
import cz.moneta.test.harness.support.web.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

import static cz.moneta.test.dsl.ufo.banka.pages.main.signature.patterns.PVX043_S002_SignaturePatternsPage.CONTINUE_BUTTON;
import static cz.moneta.test.dsl.ufo.banka.pages.main.signature.patterns.PVX043_S002_SignaturePatternsPage.PVX043_S002_PAGE_LABEL_XPATH;

@Wait(value = PVX043_S002_PAGE_LABEL_XPATH, by = Lookup.XPATH)
@Wait(CONTINUE_BUTTON)
public interface PVX043_S002_SignaturePatternsPage extends WebFlow<PVX043_S002_SignaturePatternsPage> {

    String PVX043_S002_PAGE_LABEL_XPATH = "//div[text()='PVX043_S002']";
    String CONTINUE_BUTTON = "PVX043_S002_B009";
    String STATUS_ICON_PHYSIC = "PVX043_S002_P001";
    String STATUS_ICON_STATIC = "PVX043_S002_P003";
    String STATUS_ICON_STATIC_IS_VISIBLE_XPATH = "//img[@id = '" + STATUS_ICON_STATIC + "' and not(contains(@style, 'display: none;'))]";
    String STATUS_ICON_PHYSIC_IS_VISIBLE_XPATH = "//img[@id = '" + STATUS_ICON_PHYSIC + "' and not(contains(@style, 'display: none;'))]";

    @Click(value = CONTINUE_BUTTON, jsClick = true)
    NPV019_S001_SignaturePatternsEditPage clickSignaturePatternsEdit();

    @CheckElementPresent(value = STATUS_ICON_PHYSIC_IS_VISIBLE_XPATH, by = Lookup.XPATH)
    PVX043_S002_SignaturePatternsPage isSignaturePhysic();

    @CheckElementPresent(value = STATUS_ICON_STATIC_IS_VISIBLE_XPATH, by = Lookup.XPATH)
    PVX043_S002_SignaturePatternsPage isSignatureStatic();

}
