package cz.moneta.test.dsl.ib.accountsandtransactions.templates;

import cz.moneta.test.dsl.ib.IbPageFlow;
import cz.moneta.test.dsl.ib.components.MainMenu;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.ib.accountsandtransactions.templates.TemplateNewBetweenCreatePage.NEW_TEMPLATE_BUTTON;

@Wait(value = NEW_TEMPLATE_BUTTON)
public interface TemplateNewBetweenCreatePage extends IbPageFlow<TemplateNewBetweenCreatePage>, MainMenu {
    String NEW_TEMPLATE_BUTTON = "//img[@alt='Nová šablona']";
    String TYPE_PAYMENT_SELECT = "//input[@value='FPOT2']";
    String TEMPLATE_NAME_INPUT = "//input[@name='fpo.template_name']";
    String TYPE_PAYMENT2_SELECT = "//input[@value='FPOK']";
    String TYPE_SEPA_PAYMENT_SELECT = "//input[@value='FPOE']";
    String ACCOUNT_SELECT = "//select[@id='fromAccountFPO']/option[2]";
    String DOMESTIC_ACCOUNT_SELECT = "//select[@id='fromAccountDPO']/option[2]";
    String ACCOUNT_SEPA_FROM_SELECT = "//select[@id='fromAccountFPO']/option[2]";
    String OWN_ACCOUNT_FROM_SELECT = "//select[@id='fromAccountFPOK']/option[2]";
    String PARTNER_ACCOUNT_NUMBER = "//input[@name='partnerAccountNumberFPOT2']";
    String DOMESTIC_PARTNER_ACCOUNT_NUMBER = "//input[@name='partnerAccountNumber']";
    String DOMESTIC_PARTNER_BANK = "//input[@id='partnerAccountBank']";
    String DOMESTIC_AMOUNT = "//input[@id='amount']";
    String SEPA_AMOUNT = "//input[@id='castka']";
    String SEPA_IBAN = "//input[@id='partnerAccountNumber5']";
    String SEPA_PAYEE_NAME = "//input[@id='prijemce']";
    String SEPA_PAYEE_ADDRESS = "//input[@id='prijemceJmeno']";
    String SEPA_PAYEE_ADDRESS2 = "//input[@id='prijemceStat']";
    String SEPA_COUNTRY_OF_PAYEE = "//select[@id='zemePrijemcePlatby']/option[@value='DE']";
    String SEPA_RECIPIENT_MSG = "//textarea[@name='fpo.avizo']";
    String SEPA_REFERENCE = "//input[@id='debitReference']";
    String SECOND_OWN_ACCOUNT_TO_SELECT = "//select[@id='fpo.toAccount']/option[3]";
    String CHECK_ACCOUNT_BUTTON = "//img[@alt='Ověřit účet příjemce']";
    String TEMPLATE_AMOUNT_INPUT = "//input[@id='castka']";
    String VARIABLE_SYMBOL_INPUT = "//input[@id='fpo_vs']";
    String DOMESTIC_VARIABLE_SYMBOL_INPUT = "//input[@id='vs']";
    String DETAIL_URL = "//img[@src='images_new/male_plus.gif']";
    String CONSTANT_SYMBOL_INPUT = "//input[@name='fpo_cs']";
    String DOMESTIC_CONSTANT_SYMBOL_INPUT = "//input[@name='cs']";
    String SPECIFIC_SYMBOL_INPUT = "//input[@name='fpo_ss']";
    String DOMESTIC_SPECIFIC_SYMBOL_INPUT = "//input[@name='ss']";
    String CURRENCY_CZK_SELECT = "//select[@id='mena']/option[@value='CZK']";
    String RECIPIENT_MSG = "//textarea[@name='fpo.avizoFX']";
    String DOMESTIC_RECIPIENT_MSG = "//textarea[@name='dpo.avizo']";
    String CATEGORY_SELECT = "//select[@id='categoryId']/option[2]";
    String NEXT_TEMPLATE_BUTTON = "//img[@src='images_new/pokracovat_b.gif']";
    String NOTE_MSG = "//textarea[@name='note']";

    @Click(NEW_TEMPLATE_BUTTON)
    TemplateNewBetweenCreatePage clickNewTemplate();

    @Click(TYPE_PAYMENT_SELECT)
    TemplateNewBetweenCreatePage clickTypePayment();

    @Click(TYPE_PAYMENT2_SELECT)
    TemplateNewBetweenCreatePage clickTypeOwnPayment();

    @Click(TYPE_SEPA_PAYMENT_SELECT)
    TemplateNewBetweenCreatePage clickTypeSepaPayment();

    @TypeInto(TEMPLATE_NAME_INPUT)
    TemplateNewBetweenCreatePage fillTemplateName(String templateName);

    @Click(ACCOUNT_SELECT)
    TemplateNewBetweenCreatePage clickAccountSelect();

    @Click(ACCOUNT_SEPA_FROM_SELECT)
    TemplateNewBetweenCreatePage clickAccountSepaSelect();

    @Click(DOMESTIC_ACCOUNT_SELECT)
    TemplateNewBetweenCreatePage clickDomesticAccountSelect();

    @Click(OWN_ACCOUNT_FROM_SELECT)
    TemplateNewBetweenCreatePage clickAccountOwnSelect();

    @TypeInto(PARTNER_ACCOUNT_NUMBER)
    TemplateNewBetweenCreatePage fillPartnerAccount(String partnerAccountNumber);

    @TypeInto(DOMESTIC_PARTNER_BANK)
    TemplateNewBetweenCreatePage fillDomesticPartnerBank(String domesticPartnerBank);

    @TypeInto(DOMESTIC_AMOUNT)
    TemplateNewBetweenCreatePage fillDomesticAmount(String domesticAmount);

    @TypeInto(SEPA_AMOUNT)
    TemplateNewBetweenCreatePage fillSepaAmount(String sepaAmount);

    @TypeInto(SEPA_IBAN)
    TemplateNewBetweenCreatePage fillSepaIban(String sepaIban);

    @TypeInto(SEPA_PAYEE_NAME)
    TemplateNewBetweenCreatePage fillSepaPayeeName(String sepaPayeeName);

    @TypeInto(SEPA_PAYEE_ADDRESS)
    TemplateNewBetweenCreatePage fillSepaPayeeAddress(String sepaPayeeAddress);

    @TypeInto(SEPA_PAYEE_ADDRESS2)
    TemplateNewBetweenCreatePage fillSepaPayeeAddress2(String sepaPayeeAddress2);

    @Click(SEPA_COUNTRY_OF_PAYEE)
    TemplateNewBetweenCreatePage clickSepaCountryPayee();

    @TypeInto(SEPA_RECIPIENT_MSG)
    TemplateNewBetweenCreatePage fillSepaRecipientMsg(String sepaRecipientMsg);

    @TypeInto(SEPA_REFERENCE)
    TemplateNewBetweenCreatePage fillSepaReference(String sepaReference);

    @TypeInto(DOMESTIC_PARTNER_ACCOUNT_NUMBER)
    TemplateNewBetweenCreatePage fillDomesticPartnerAccount(String domesticPartnerAccountNumber);

    @Click(SECOND_OWN_ACCOUNT_TO_SELECT)
    TemplateNewBetweenCreatePage clickSecondOwnAccount();

    @Click(CHECK_ACCOUNT_BUTTON)
    TemplateNewBetweenCreatePage clickCheckButton();

    @TypeInto(TEMPLATE_AMOUNT_INPUT)
    TemplateNewBetweenCreatePage fillTemplateAmount(String templateAmountInput);

    @Click(CURRENCY_CZK_SELECT)
    TemplateNewBetweenCreatePage clickCurrencySelect();

    @Click(CURRENCY_CZK_SELECT)
    TemplateNewBetweenCreatePage clickCurrencyOwnSelect();

    @TypeInto(VARIABLE_SYMBOL_INPUT)
    TemplateNewBetweenCreatePage fillTemplateVs(String variableSymbol);

    @TypeInto(DOMESTIC_VARIABLE_SYMBOL_INPUT)
    TemplateNewBetweenCreatePage fillTemplateDomesticVs(String domesticVariableSymbol);

    @Click(DETAIL_URL)
    TemplateNewBetweenCreatePage clickDetailUrl();

    @TypeInto(CONSTANT_SYMBOL_INPUT)
    TemplateNewBetweenCreatePage fillTemplateCs(String constantSymbol);

    @TypeInto(DOMESTIC_CONSTANT_SYMBOL_INPUT)
    TemplateNewBetweenCreatePage fillTemplateDomesticCs(String domesticConstantSymbol);

    @TypeInto(SPECIFIC_SYMBOL_INPUT)
    TemplateNewBetweenCreatePage fillTemplateSs(String specificSymbol);

    @TypeInto(DOMESTIC_SPECIFIC_SYMBOL_INPUT)
    TemplateNewBetweenCreatePage fillTemplateDomesticSs(String domesticSpecificSymbol);

    @TypeInto(RECIPIENT_MSG)
    TemplateNewBetweenCreatePage fillRecipientMsg(String recipientMsg);

    @TypeInto(DOMESTIC_RECIPIENT_MSG)
    TemplateNewBetweenCreatePage fillDomesticRecipientMsg(String domesticRecipientMsg);

    @Click(CATEGORY_SELECT)
    TemplateNewBetweenCreatePage clickCategorySelect();

    @TypeInto(NOTE_MSG)
    TemplateNewBetweenCreatePage fillRecipientNote(String noteMsg);

    @Click(NEXT_TEMPLATE_BUTTON)
    TemplateNewBetweenAuthorizePage clickNextButton();
}
