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

import cz.moneta.test.dsl.ufo.banka.pages.main.client.settings.TIS051_S001_DispositionGeneratePage;
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.GetElementContent;
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.HPO008_S001_OnlineChannelsPage.ADC_SETTING_BUTTON;

@Wait(ADC_SETTING_BUTTON)
public interface HPO008_S001_OnlineChannelsPage extends WebFlow<HPO008_S001_OnlineChannelsPage>, StoreAccessor {

    String ADC_SETTING_BUTTON = "HPO008_S001_B022";
    String BANKAPI_ACTIVATION_BUTTON = "HPO008_S001_I005";
    String EDIT_BANKAPI_BUTTON = "HPO008_S001_B001";
    String LIMIT_BANKAPI_LABEL = "HPO008_S001_L056";
    String EDIT_IB_PASSWORD_MK = "HPO008_S001_B018";

    @Click(BANKAPI_ACTIVATION_BUTTON)
    HPO008_S001_OnlineChannelsPage activationBankApiChannel();

    @Click(EDIT_BANKAPI_BUTTON)
    ADC026_S001_BankApiDetailPage editBankApiChannel();

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

    @GetElementContent(LIMIT_BANKAPI_LABEL)
    String getLimit();

    @Click(EDIT_IB_PASSWORD_MK)
    ADC006_S001_InternetBankPasswordMobileKeyPage editIbPasswordMkChannel();
}