package cz.moneta.test.dsl.mobile.smartbanking.payment;

import cz.moneta.test.dsl.mobile.smartbanking.SbViewFlow;
import cz.moneta.test.harness.support.mobile.MobileLookup;
import cz.moneta.test.harness.support.mobile.android.AndroidClick;
import cz.moneta.test.harness.support.mobile.android.AndroidTypeInto;
import cz.moneta.test.harness.support.mobile.android.AndroidTypeIntos;
import cz.moneta.test.harness.support.mobile.android.AndroidWait;
import cz.moneta.test.harness.support.mobile.ios.IosClick;
import cz.moneta.test.harness.support.mobile.ios.IosTypeInto;
import cz.moneta.test.harness.support.mobile.ios.IosTypeIntos;
import cz.moneta.test.harness.support.mobile.ios.IosWait;

import static cz.moneta.test.dsl.mobile.smartbanking.payment.PaymentConfirmView.IOS_AMOUNT;
import static cz.moneta.test.dsl.mobile.smartbanking.payment.PaymentConfirmView.PAYMENT_PAGE;

@AndroidWait(value = PAYMENT_PAGE)
@IosWait(IOS_AMOUNT)
public interface PaymentConfirmView extends SbViewFlow<PaymentConfirmView> {
    String PAYMENT_PAGE = "logged_activity_fragment_container";
    String AMOUNT = "edit_amount";
    String DUE_DATE = "edit_due_date";
    String VARIABLE_SYMBOL = "//android.widget.LinearLayout[contains(@resource-id, 'id/edit_payment_symbol_variable')]" +
            "//android.widget.EditText[contains(@resource-id, 'id/txt_edit_value')]";

    String CONTINUE_BUTTON = "btn_payment_continue";

    String IOS_AMOUNT = "PAYMENT_AMOUNT";
    String IOS_VARIABLE_SYMBOL = "PAYMENT_VS";
    String IOS_CONTINUE_BUTTON = "Pokračovat";

    @AndroidTypeIntos({@AndroidTypeInto(AMOUNT), @AndroidTypeInto(value = VARIABLE_SYMBOL, by = MobileLookup.XPATH)})
    @IosTypeIntos({@IosTypeInto(IOS_AMOUNT), @IosTypeInto(IOS_VARIABLE_SYMBOL)})
    PaymentConfirmView setPaymentData(String amount, String vs);

    @AndroidClick(value = CONTINUE_BUTTON)
    @IosClick(IOS_CONTINUE_BUTTON)
    PaymentSummaryView continueButton();
}
