package cz.moneta.test.dsl.ufo.banka.pages.search;

import cz.moneta.test.dsl.ufo.banka.pages.cards.debit.OBR003_S001_ClientContractSignPage;
import cz.moneta.test.dsl.ufo.banka.pages.fon.ZAS003_S001_ChooseLegalRepresentativePage;
import cz.moneta.test.dsl.ufo.banka.pages.main.HKO101_S001_MainClientPage;
import cz.moneta.test.dsl.ufo.banka.pages.products.current.account.HPO001_S001_CurrentAccountDetailsPage;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.ufo.UfoEndpoint;
import cz.moneta.test.harness.support.web.CustomAction;
import cz.moneta.test.harness.support.web.WebFlow;

public interface HLO001_S001_ClientSearchPageTransition extends WebFlow<HLO001_S001_ClientSearchPageTransition>, StoreAccessor {

    CIF013_S002_ClientNotFoundPage onClientNotFound();

    HKO101_S001_MainClientPage onClientDetailPage();

    CIF013_OBR001_EmployeeClientPage onEmployeeClientPage();

    ZAS003_S001_ChooseLegalRepresentativePage onChooseLegalRepresentative();

    HPO001_S001_CurrentAccountDetailsPage onCurrentAccountDetailsPage();

    @CustomAction
    default HKO101_S001_MainClientPage onClientDetailPageCloseAlertIfVisible() {
        UfoEndpoint endpoint = getEndpoint(UfoEndpoint.class);
        if (endpoint.isAlertPresent(3)) {
            endpoint.dismissAlert(1);
        }
        return null;
    }

    OBR003_S001_ClientContractSignPage onOpFoundPage();
}
