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;

import static cz.moneta.test.dsl.ufo.banka.pages.products.sme.KUL002_S001_ProductDetailPage.*;

@Wait(value = KUL002_S001_PAGE_LABEL_XPATH, by = Lookup.XPATH, waitSecondsForElement = 60)
@Wait(CONTINUE_BUTTON)
public interface KUL002_S001_ProductDetailPage extends WebFlow<KUL002_S001_ProductDetailPage> {
    String KUL002_S001_PAGE_LABEL_XPATH = "//div[text()='KUL002_S001']";

    String CONTINUE_BUTTON = "KUL002_S001_B001";
    String CURRENT_ACCOUNT_SELECT = "KUL002_S001_C001";
    String FIRST_CURRENT_ACCOUNT = " //*[@id='KUL002_S001_C001']/option[2]";
    String FINANCING_REASON_SELECT = "KUL002_S001_C004";
    String PAYMENT_DAY_SELECT = "KUL002_S001_C008";
    String REQUIRED_LOAN_AMOUNT_INPUT = "KUL002_S001_E001";
    String NUMBER_OF_PAYMENTS_INPUT = "KUL002_S001_E002";
    String INTEREST_RATE_APPROVED_BY_RECORD_INPUT = "KUL002_S001_E013";
    String RESIDENTIAL_UNITS_COUNT_INPUT = "KUL002_S001_E003";
    String NON_RESIDENTAL_UNITS_COUNT_INPUT = "KUL002_S001_E011";
    String MONHTLY_CONTRIBUTION_TO_FOND_AMOUNT_INPUT = "KUL002_S001_E012";
    String FINANCED_OBJECT_STREET_INPUT = "KUL002_S001_E025";
    String FINANCED_OBJECT_DESCRIPTIVE_NUMBER_INPUT = "KUL002_S001_E026";
    String FINANCED_OBJECT_CITY_INPUT = "KUL002_S001_E028";
    String FINANCED_OBJECT_ZIP_CODE_INPUT = "KUL002_S001_E029";
    String FINANCED_OBJECT_CZECH_COUNTRY_BUTTON = "KUL002_S001_B010";
    String LOAD_FINANCED_ADDRESS_FROM_CIF = "KUL002_S001_B008";

    @TypeInto(REQUIRED_LOAN_AMOUNT_INPUT)
    KUL002_S001_ProductDetailPage fillRequiredLoanAmount(String requiredLoanAmount);

    @TypeInto(value = NUMBER_OF_PAYMENTS_INPUT, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE, waitSecondsForElement = 60))
    KUL002_S001_ProductDetailPage fillNumberOfPayments(String numberOfPayments);

    @Select(value = PAYMENT_DAY_SELECT, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE, waitSecondsForElement = 60))
    KUL002_S001_ProductDetailPage selectPaymentDay(String paymentDay);

    @Click(CURRENT_ACCOUNT_SELECT)
    @Click(value = FIRST_CURRENT_ACCOUNT, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE, waitSecondsForElement = 60))
    KUL002_S001_ProductDetailPage selectFirstCurrentAccount();

    @Select(value = FINANCING_REASON_SELECT, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE, waitSecondsForElement = 60))
    KUL002_S001_ProductDetailPage selectFinancingReason(String financingReason);

    @TypeInto(INTEREST_RATE_APPROVED_BY_RECORD_INPUT)
    KUL002_S001_ProductDetailPage fillInterestRateApprovedByRecord(String interestRateApprovedByRecord);

    @TypeInto(RESIDENTIAL_UNITS_COUNT_INPUT)
    KUL002_S001_ProductDetailPage fillResidentalUnitsCount(String residentalUnitsCount);

    @TypeInto(NON_RESIDENTAL_UNITS_COUNT_INPUT)
    KUL002_S001_ProductDetailPage fillNonResidentalUnitsCount(String nonResidentalUnitsCount);

    @TypeInto(MONHTLY_CONTRIBUTION_TO_FOND_AMOUNT_INPUT)
    KUL002_S001_ProductDetailPage fillMonthlyContributionToFondAmount(String monthlyContributionToFondAmount);

    @TypeInto(FINANCED_OBJECT_STREET_INPUT)
    KUL002_S001_ProductDetailPage fillFinancedObjectStreet(String financedObjectStreet);

    @TypeInto(FINANCED_OBJECT_DESCRIPTIVE_NUMBER_INPUT)
    KUL002_S001_ProductDetailPage fillFinancedObjectDescriptiveNumber(String financedObjectDescriptiveNumber);

    @TypeInto(FINANCED_OBJECT_CITY_INPUT)
    KUL002_S001_ProductDetailPage fillFinancedObjectCity(String financedObjectCity);

    @TypeInto(FINANCED_OBJECT_ZIP_CODE_INPUT)
    KUL002_S001_ProductDetailPage fillFinancedObjectZipCode(String financedObjectZipCode);

    @Click(value = FINANCED_OBJECT_CZECH_COUNTRY_BUTTON, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    KUL002_S001_ProductDetailPage clickFinancedObjectCzechCountry();

    @Click(value = LOAD_FINANCED_ADDRESS_FROM_CIF, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    KUL002_S001_ProductDetailPage clickLoadFinancedAddressFromCif();

    @Click(CONTINUE_BUTTON)
    KUL001_S001_SelectProductsPage clickContinue();
}
