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

import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.operations.shared.SharedElements.LOAD_IMG_DIV_CLASS;

@Wait(value = KUL058_S001_CommercialCreditCardDetailPage.KUL058_S001_ID_XPATH, waitSecondsForElement = 40, by = Lookup.XPATH)
public interface KUL058_S001_CommercialCreditCardDetailPage extends WebFlow<KUL058_S001_CommercialCreditCardDetailPage> {
    String KUL058_S001_ID_XPATH = "//div[contains(text(),'KUL058_S001')]";

    String ACCOUNT_AT_MMB_SELECT = "KUL058_S001_C001";
    String DISTRIBUTION_SELECT = "KUL058_S001_C007";

    String AMOUNT_OF_CREDIT_INPUT = "KUL058_S001_E001";

    String ACCOUNT_AT_MMB_RADIO = "KUL058_S001_R002_3";
    String CONTINUE_BUTTON = "KUL058_S001_X092";

    @TypeInto(AMOUNT_OF_CREDIT_INPUT)
    KUL058_S001_CommercialCreditCardDetailPage fillAmount(String amountOfCreditCard);

    @Select(value = DISTRIBUTION_SELECT)
    KUL058_S001_CommercialCreditCardDetailPage selectDistribution(String distributionType);

    @Click(value = ACCOUNT_AT_MMB_RADIO, jsClick = true)
    KUL058_S001_CommercialCreditCardDetailPage clickAccountAtMMB();

    @Select(value = ACCOUNT_AT_MMB_SELECT, selectByOrder = true, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    KUL058_S001_CommercialCreditCardDetailPage selectFirstAccount(int indexOfFirstAccount);

    @Click(CONTINUE_BUTTON)
    KUL058_S001_CommercialCreditCardDetailPageTransitions clickContinue();
}
