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

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.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

import static cz.moneta.test.dsl.ufo.banka.pages.products.consolidation.UDC005_S002_CommitmentEditingPage.EVIDENCE_OF_COMMITMENT_EXISTENCE;
import static cz.moneta.test.dsl.ufo.banka.pages.products.consolidation.UDC005_S002_CommitmentEditingPage.PAGE_ID;

@Wait(value = {PAGE_ID, EVIDENCE_OF_COMMITMENT_EXISTENCE}, waitSecondsForElement = 30)
public interface UDC005_S002_CommitmentEditingPage extends WebFlow<UDC005_S002_CommitmentEditingPage> {

    String PAGE_ID = "UDC005_S002_X001";
    String INSTALLMENT_COMPANY_NAME = "UDC005_S002_C001";
    String EVIDENCE_OF_COMMITMENT_EXISTENCE = "UDC005_S002_C005";
    String LOAN_AGREEMENT_NUMBER = "UDC005_S002_E001";
    String LOAN_ACCOUNT_FOR_PAYMENT = "UDC005_S002_E002";
    String BANK_CODE = "UDC005_S002_E003";
    String PROOF_OF_REPAYMENT = "UDC005_S002_C006";
    String ANNUAL_INTEREST_RATE = "UDC005_S002_E011";
    String AMOUNT_TO_PAY = "UDC005_S002_E013";
    String SAVE_BUTTON = "UDC005_S002_B001";

    @Select(INSTALLMENT_COMPANY_NAME)
    UDC005_S002_CommitmentEditingPage selectInstallmentCompanyName(String installmentCompanyName);

    @Select(EVIDENCE_OF_COMMITMENT_EXISTENCE)
    UDC005_S002_CommitmentEditingPage selectEvidenceOfCommitmentExistence(String evidenceType);

    @TypeInto(LOAN_AGREEMENT_NUMBER)
    UDC005_S002_CommitmentEditingPage typeIntoLoanAgreementNumber(int loanAgreementNumber);

    @TypeInto(LOAN_ACCOUNT_FOR_PAYMENT)
    UDC005_S002_CommitmentEditingPage typeIntoLoanAccountForPayment(int loanAccountForPayment);

    @TypeInto(BANK_CODE)
    UDC005_S002_CommitmentEditingPage typeIntoBankCode(String bankCode);

    @Select(PROOF_OF_REPAYMENT)
    UDC005_S002_CommitmentEditingPage selectProofOfRepayment(String proofOfRepayment);

    @TypeInto(ANNUAL_INTEREST_RATE)
    UDC005_S002_CommitmentEditingPage typeIntoAnnualInterestRate(int annualInterestRate);

    @TypeInto(AMOUNT_TO_PAY)
    UDC005_S002_CommitmentEditingPage typeIntoAmountToPay(int amountToPay);

    @Click(SAVE_BUTTON)
    UDC005_S001_LoanConsolidationScoringCommitmentsPage clickSaveButtonToConsolidationScoringPage();
}