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

import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.banka.pages.income.FIN002_S002_FinancialIncomePage.*;
import static cz.moneta.test.dsl.ufo.operations.shared.SharedElements.LOAD_IMG_DIV_CLASS;

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

    String CONTINUE_BUTTON = "FIN002_S002_B003";

    String NUMBER_OF_MONTHS_SELECT = "FIN002_S002_C002";
    String TYPE_OF_INCOME_SELECT = "FIN002_S002_C003";

    String INCOME_DATE_INPUT = "FIN002_S002_E001";

    String VERIFIED_RADIO = "FIN002_S002_R001_289";
    String TAX_ADVISOR_NO_RADIO = "FIN002_S002_R006_0";
    String NOT_VERIFIED_RADIO = "FIN002_S002_R001_290";
    String ELECTRONIC_FORM_RADIO = "FIN002_S002_R002_1";
    String SPOKEN_FORM_RADIO = "FIN002_S002_R002_2";
    String FOP_PAPER_FORM_RADIO = "FIN002_S002_R002_3";
    String TAX_EVIDENCE_RADIO = "FIN002_S002_R003_1";
    String ACCOUNTANCY_RADIO = "FIN002_S002_R003_2";
    String PERCENTAGE_INCOME_SPENDS_RADIO = "FIN002_S002_R003_6";
    String PO_PAPER_FORM_RADIO = "FIN002_S002_R004_3";
    String DATA_BALANCE_SHEET_RADIO = "FIN002_S002_R007_0";

    Extend_FinancialIncomePageForFop onNewFinancialIncomeFop();

    Extend_FinancialIncomePageForPo onNewFinancialIncomePo();

    @Select(value = TYPE_OF_INCOME_SELECT, andWait = @Wait(value = FOP_PAPER_FORM_RADIO))
    FIN002_S002_FinancialIncomePage selectTypeOfIncome(String Type);

    @Click(value = PERCENTAGE_INCOME_SPENDS_RADIO, jsClick = true)
    FIN002_S002_FinancialIncomePage clickPercentageIncomeSpends();

    @Click(value = FOP_PAPER_FORM_RADIO, jsClick = true)
    FIN002_S002_FinancialIncomePage clickPaperFormForFop();

    @Click(value = PO_PAPER_FORM_RADIO, jsClick = true)
    FIN002_S002_FinancialIncomePage clickPaperFormForPo();

    @Click(value = VERIFIED_RADIO, jsClick = true)
    FIN002_S002_FinancialIncomePage clickVerified();

    @Click(value = TAX_ADVISOR_NO_RADIO, jsClick = true)
    FIN002_S002_FinancialIncomePage clickTaxAdvisorNo();

    @TypeInto(value = INCOME_DATE_INPUT, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE, waitSecondsForElement = 60))
    FIN002_S002_FinancialIncomePage fillIncomeDate(String incomeDate);

    @Select(value = NUMBER_OF_MONTHS_SELECT, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE, waitSecondsForElement = 60))
    FIN002_S002_FinancialIncomePage selectNumberOfMonths(String numberOfMonths);

    @Click(CONTINUE_BUTTON)
    FIN002_S003_TaxAndDiscountsPage clickContinue();

    @Click(value = DATA_BALANCE_SHEET_RADIO, jsClick = true)
    FIN002_S002_FinancialIncomePage clickDataBalanceSheetRadio();
}
