package cz.moneta.test.dsl.ufo.banka.pages.products.consolidation;

import cz.moneta.test.dsl.ufo.banka.pages.cards.credit.OPN008_S001_SignContractPage;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.ufo.UfoEndpoint;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.CustomAction;
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.products.consolidation.UDC007_S005_ApprovedConsolidationPrintPage.CONTINUE_BUTTON;

@Wait(value = CONTINUE_BUTTON, waitSecondsForElement = 30)
public interface UDC007_S005_ApprovedConsolidationPrintPage extends WebFlow<UDC007_S005_ApprovedConsolidationPrintPage>, StoreAccessor {
    String CONTINUE_BUTTON = "UDC007_S005_B003";

    @CustomAction
    default UDC007_S005_ApprovedConsolidationPrintPage dismissPopupWindow() {
        UfoEndpoint endpoint = getEndpoint(UfoEndpoint.class);
        endpoint.acceptAlert(15);
        return null;
    }

    @Click(CONTINUE_BUTTON)
    OPN008_S001_SignContractPage clickContinueButton();
}