package cz.moneta.test.dsl.ufo.banka.pages.requests;

import cz.moneta.test.dsl.ufo.banka.pages.fon.DMS001_S001_ScanDocumentsPage;
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.banka.pages.requests.NEP024_S005_ConfirmationOfReceiptAddPage.PAGE_HEADER_DIV;

@Wait(PAGE_HEADER_DIV)
public interface NEP024_S005_ConfirmationOfReceiptAddPage extends WebFlow<NEP024_S005_ConfirmationOfReceiptAddPage> {

    String PAGE_HEADER_DIV = "NEP024_S005_L009";
    String EMPLOYMENT_FROM_INPUT = "NEP024_S005_E016";
    String NET_INCOME_INPUT = "NEP024_S005_E015";
    String OTHER_LOAN_PAYMENTS_INPUT = "NEP024_S005_E017";
    String WAGE_DEDUCTIONS_INPUT = "NEP024_S005_E010";
    String DEPENDENT_PERSON_INPUT = "NEP024_S005_E018";
    String OCCUPATION_INSTITUTION_NAME_INPUT = "NEP024_S005_E005";
    String OCCUPATION_INSTITUTION_ICO_INPUT = "NEP024_S005_E021";
    String OCCUPATION_INSTITUTION_STREET_INPUT = "NEP024_S005_E006";
    String OCCUPATION_INSTITUTION_DESCRIPTIVE_NUMBER_INPUT = "NEP024_S005_E007";
    String OCCUPATION_INSTITUTION_ORIENTATION_NUMBER_INPUT = "NEP024_S005_E019";
    String OCCUPATION_INSTITUTION_TOWN_INPUT = "NEP024_S005_E008";
    String OCCUPATION_INSTITUTION_ZIP_INPUT = "NEP024_S005_E022";
    String OCCUPATION_STATUS_SELECT = "NEP024_S005_C005";
    String DATE_OF_ISSUE_INPUT = "NEP024_S005_E012";
    String STAMP_CHECKBOX = "NEP024_S005_H002_1";
    String SIGNATURE_CHECKBOX = "NEP024_S005_H001_1";
    String GENERATE_PDF_BUTTON = "NEP024_S005_B003";
    String SENT_BUTTON = "NEP024_S005_B001";
    String SENT_BUTTON_ACTIVE_XPATH = "//button[@id='" + SENT_BUTTON + "' and not(@disabled)]";
    String SALARY_IN_CASH_SELECT = "NEP024_S005_C006";

    @TypeInto(EMPLOYMENT_FROM_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillEmploymentFrom(String employmentFrom);

    @TypeInto(NET_INCOME_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillNetIncome(String netIncome);

    @TypeInto(OTHER_LOAN_PAYMENTS_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillOtherLoanPayments(String otherLoanPayments);

    @TypeInto(WAGE_DEDUCTIONS_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillWageDeductions(String wageDeductions);

    @TypeInto(DEPENDENT_PERSON_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillDependendPerson(String dependentPerson);

    @TypeInto(OCCUPATION_INSTITUTION_NAME_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillOccupationInstitutionName(String name);

    @TypeInto(OCCUPATION_INSTITUTION_ICO_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillOccupationInstitutionIco(String ico);

    @TypeInto(OCCUPATION_INSTITUTION_STREET_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillOccupationInstitutionStreet(String street);

    @TypeInto(OCCUPATION_INSTITUTION_DESCRIPTIVE_NUMBER_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillOccupationInstitutionDescriptiveNumber(String descriptiveNumber);

    @TypeInto(OCCUPATION_INSTITUTION_ORIENTATION_NUMBER_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillOccupationOrientationNumber(String orientationNumber);

    @TypeInto(OCCUPATION_INSTITUTION_TOWN_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillOccupationInstitutionTown(String town);

    @TypeInto(OCCUPATION_INSTITUTION_ZIP_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillOccupationInstitutionZip(String zip);

    @Select(OCCUPATION_STATUS_SELECT)
    NEP024_S005_ConfirmationOfReceiptAddPage selectOccupationStatus(String status);

    @TypeInto(DATE_OF_ISSUE_INPUT)
    NEP024_S005_ConfirmationOfReceiptAddPage fillDateOfIssue(String dateOfIssue);

    @Click(STAMP_CHECKBOX)
    @Click(SIGNATURE_CHECKBOX)
    NEP024_S005_ConfirmationOfReceiptAddPage checkSignatureAndStampCheckboxes();

    @Click(value = GENERATE_PDF_BUTTON, andWait = @Wait(value = SENT_BUTTON_ACTIVE_XPATH, by = Lookup.XPATH))
    NEP024_S005_ConfirmationOfReceiptAddPage generatePdf();

    @Click(SENT_BUTTON)
    NEP016_S023_ClientRequiredDocumentsListPage continueToClientRequiredDocumentsListPage();

    @Click(SENT_BUTTON)
    DMS001_S001_ScanDocumentsPage continueToScanDocumentsPage();

    @Select(SALARY_IN_CASH_SELECT)
    NEP024_S005_ConfirmationOfReceiptAddPage selectSalaryInCash(String isSalaryInCash);

}