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

import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Lookup;
import cz.moneta.test.harness.support.web.Select;
import cz.moneta.test.harness.support.web.TypeInto;
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_S001_ClientDetailsPage.SEND_BUTTON;

@Wait({SEND_BUTTON})
public interface OPK705_S001_ClientDetailsPage extends WebFlow<OPK705_S001_ClientDetailsPage> {
    String SEND_BUTTON = "OPK705_S001_B001";

    @Select("OPK705_S001_C020")
    OPK705_S001_ClientDetailsPage selectJob(String jobType);

    @Select("OPK705_S001_C029")
    OPK705_S001_ClientDetailsPage selectContractType(String contractType);

    @Select("OPK705_S001_C006")
    OPK705_S001_ClientDetailsPage selectSecondId(String idCard);

    @Click(SEND_BUTTON)
    OPK705_S002_AskClientToConfirmPage continueToUserConfirmation();

    @TypeInto("OPK705_S001_E044")
    OPK705_S001_ClientDetailsPage setNumberOfIncomeSources(String numberOfIncomeSources);

    @TypeInto("OPK705_S001_N045")
    OPK705_S001_ClientDetailsPage setNetIncomeThreeMonthsAvg(int netIncomeThreeMonthsAvg);

    @TypeInto("OPK705_S001_E042")
    OPK705_S001_ClientDetailsPage setOtherMonthlyExpenses(int otherMonthlyExpenses);

    @TypeInto("OPK705_S001_E014")
    OPK705_S001_ClientDetailsPage setTotalHouseholdIncome(int totalHouseholdIncome);

    @Click("OPK705_S001_H005_1")
    OPK705_S001_ClientDetailsPage checkEmploymentDataVerifiedWithClient();

    @Click("OPK705_S001_H008_1")
    OPK705_S001_ClientDetailsPage checkIncomeDataVerifiedWithClient();

    @Click("OPK705_S001_R002_0")
    OPK705_S001_ClientDetailsPage selectDoNotCreateNewCheckingAccount();

    @TypeInto("OPK705_S001_N050")
    OPK705_S001_ClientDetailsPage setActivationPassword(String activationPassword);

    @TypeInto("OPK705_S001_E017")
    OPK705_S001_ClientDetailsPage setDailyPurchaseLimit(String dailyPurchasingLimit);

    @TypeInto("OPK705_S001_E018")
    OPK705_S001_ClientDetailsPage setDailyWithdrawLimit(String dailyWithdrawLimit);

    @TypeInto("OPK705_S001_E053")
    OPK705_S001_ClientDetailsPage setDailyOnlinePaymentsLimit(String dailyOnlinePaymentsLimit);

    @Select("OPK705_S001_C019")
    OPK705_S001_ClientDetailsPage setLoyaltyProgram(String loyaltyProgram);

    @Select(value = "OPK705_S001_C002", selectByOrder = true)
    OPK705_S001_ClientDetailsPage selectAccountForIncaso(int order);

    @Select("OPK705_S001_C028")
    OPK705_S001_ClientDetailsPage selectBankCode(String code);

    @Select("OPK705_S001_C039")
    OPK705_S001_ClientDetailsPage setDiscountPackage(String discountPackage);

    @Click("OPK705_S001_R004_4")
    OPK705_S001_ClientDetailsPage setSendPinViaSMS();

    @Click(value = "//table[@id='OPK705_S001_R006']//input[@name='OPK705_S001_R006' and @value='%1$s']", by = Lookup.XPATH)
    OPK705_S001_ClientDetailsPage setFeePaymentMethod(FeePaymentsMethod feePaymentMethod);

    @Select("OPK705_S001_C021")
    OPK705_S001_ClientDetailsPage setAccountType(String accountType);

    @Click("OPK705_S001_B002")
    OPK705_S001_ClientDetailsPage requestFormalControl();

    @Wait(value = "//button[@id='" + SEND_BUTTON + "' and not(@disabled)]", by = Lookup.XPATH, waitSecondsForElement = 40)
    OPK705_S001_ClientDetailsPage assertFormalControlWasSuccessful();

    @TypeInto("OPK705_S001_E013")
    OPK705_S001_ClientDetailsPage setOtherNonMMBMonthlyPayments(int otherNonMMBMonthlyPayments);

    @TypeInto("OPK705_S001_E043")
    OPK705_S001_ClientDetailsPage setWageDeductions(int salaryDiscounts);

    @TypeInto(value = "OPK705_S001_N046", clear = true)
    OPK705_S001_ClientDetailsPage setNumberOfDependentPersons(String numberOfDependentPersons);

    @TypeInto(value = "OPK705_S001_E036", clear = true)
    OPK705_S001_ClientDetailsPage setDriveLicenceId(String driveLicenceId);

    @TypeInto(value = "OPK705_S001_E037", clear = true)
    OPK705_S001_ClientDetailsPage setDriveLicenceExpire(String expirationDate);

}