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

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

import static cz.moneta.test.dsl.ufo.banka.pages.main.TRP001_S004_CreateNewStandingOrderPage.TRP001_S004_PAGE_LABEL_XPATH;

@Wait(value = TRP001_S004_PAGE_LABEL_XPATH, by = Lookup.XPATH, waitSecondsForElement = 120)
@Wait(value = TRP001_S004_CreateNewStandingOrderPage.SAVE_BUTTON, waitSecondsForElement = 120)
public interface TRP001_S004_CreateNewStandingOrderPage extends WebFlow<TRP001_S004_CreateNewStandingOrderPage>, StoreAccessor {

    String TRP001_S004_PAGE_LABEL_XPATH = "//div[text()='TRP001_S004']";
    String SAVE_BUTTON = "TRP001_S004_B003";
    String RECEIVER_ACCOUNT_NUMBER_INPUT = "TRP001_S004_E015";
    String RECEIVER_ACCOUNT_BANK_CODE_INPUT = "TRP001_S004_E007";
    String FIRST_AMOUNT_INPUT = "TRP001_S004_E008";
    String RECEIVER_ACCOUNT_NAME_INPUT = "TRP001_S004_E016";
    String FIRST_PAYMENT_DATE_INPUT = "TRP001_S004_E004";
    String NEXT_PAYMENT_DATE_INPUT = "TRP001_S004_U001";
    String LAST_PAYMENT_DATE_INPUT = "TRP001_S004_E010";
    String NEXT_AMOUNT_INPUT = "TRP001_S004_E009";
    String VARIABLE_SYMBOL_INPUT = "TRP001_S004_E011";
    String CONSTANT_SYMBOL_INPUT = "TRP001_S004_E012";
    String SPECIFIC_SYMBOL_INPUT = "TRP001_S004_E013";
    String STANDING_ORDER_NAME_INPUT = "TRP001_S004_E002";
    String MESSAGE_INPUT = "TRP001_S004_E017";

    @TypeInto(RECEIVER_ACCOUNT_NUMBER_INPUT)
    TRP001_S004_CreateNewStandingOrderPage fillReceiverAccountNumber(String receiverAccountNumber);

    @TypeInto(RECEIVER_ACCOUNT_BANK_CODE_INPUT)
    TRP001_S004_CreateNewStandingOrderPage fillReceiverAccountBankCode(String receiverAccountBankCode);

    @TypeInto(FIRST_AMOUNT_INPUT)
    TRP001_S004_CreateNewStandingOrderPage fillFirstAmount(String firstAmount);

    @TypeInto(RECEIVER_ACCOUNT_NAME_INPUT)
    TRP001_S004_CreateNewStandingOrderPage fillReceiverAccountName(String receiverAccountName);

    @TypeInto(FIRST_PAYMENT_DATE_INPUT)
    TRP001_S004_CreateNewStandingOrderPage fillFirstPaymentDate(String firstPaymentDate);

    @TypeInto(LAST_PAYMENT_DATE_INPUT)
    TRP001_S004_CreateNewStandingOrderPage fillLastPaymentDate(String lastPaymentDate);

    @TypeIntos({@TypeInto(VARIABLE_SYMBOL_INPUT), @TypeInto(CONSTANT_SYMBOL_INPUT), @TypeInto(SPECIFIC_SYMBOL_INPUT),
            @TypeInto(STANDING_ORDER_NAME_INPUT), @TypeInto(MESSAGE_INPUT)})
    TRP001_S004_CreateNewStandingOrderPage fillOptionalData(String variableSymbol, String constantSymbol, String specificSymbol,
                                                            String message1, String message2);

    @Click(SAVE_BUTTON)
    TRP001_S004_CreateNewStandingOrderPageTransitions clickSave();

}