package cz.moneta.test.dsl.ufo.banka.pages.main.adc;

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.main.adc.ADC006_S001_InternetBankPasswordMobileKeyPage.SAVE_BUTTON;

@Wait(SAVE_BUTTON)
public interface ADC006_S001_InternetBankPasswordMobileKeyPage extends WebFlow<ADC006_S001_InternetBankPasswordMobileKeyPage>, StoreAccessor {

    String SAVE_BUTTON = "ADC006_S001_B004";
    String CANCEL_BUTTON = "ADC006_S001_B003";

    @Click(CANCEL_BUTTON)
    ADC006_S001_InternetBankPasswordMobileKeyPage cancelInternetBankChannel();

    @CustomAction
    default EVY002_S001_CancelAdcChannelInfoPage acceptAlert() {
        UfoEndpoint endpoint = getEndpoint(UfoEndpoint.class);
        endpoint.acceptAlert(20);
        return null;
    }
}