package cz.moneta.test.dsl.ufo.operations.client.creditcard;

import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Select;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Until;
import cz.moneta.test.harness.support.web.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

import static cz.moneta.test.dsl.ufo.operations.client.creditcard.OPK705_S101_ProductSelectionPage.OK_BUTTON;

@Wait({OK_BUTTON})
public interface OPK705_S101_ProductSelectionPage extends WebFlow<OPK705_S101_ProductSelectionPage> {
    String OK_BUTTON = "OPK705_S101_B002";
    String POPUP = "//div[@class='popupContent']";

    @Select(value = "OPK705_S101_C001", andWait = @Wait(value = POPUP, until = Until.GONE))
    OPK705_S101_ProductSelectionPage selectProductType(String productType);

    @Select(value = "OPK705_S101_C002", andWait = @Wait(value = POPUP, until = Until.GONE))
    OPK705_S101_ProductSelectionPage selectCardVariant(String cardVariant);

    @Select(value = "OPK705_S101_C003", andWait = @Wait(value = POPUP, until = Until.GONE))
    OPK705_S101_ProductSelectionPage selectCardBrand(String cardBrand);

    @Select(value = "OPK705_S101_C004", andWait = @Wait(value = POPUP, until = Until.GONE))
    OPK705_S101_ProductSelectionPage selectPromo(String promo);

    @Select("OPK705_S101_C006")
    OPK705_S101_ProductSelectionPage selectEmploymentType(String employmentType);

    @TypeInto(value = "OPK705_S101_E001", andWait = @Wait(value = POPUP, until = Until.GONE))
    OPK705_S101_ProductSelectionPage requestedAmount(String requestedRange);

    @Click(OK_BUTTON)
    OPK705_S001_ClientDetailsPage continueToClientDetails();

}