package cz.moneta.test.dsl.ufo.operations.ufoOperations;

import cz.moneta.test.dsl.ufo.operations.shared.SharedElements;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.operations.ufoOperations.EXE705_S001_PaymentRecordsToApprovePage.PAGE_LABEL_DIV;

@Wait(PAGE_LABEL_DIV)
public interface EXE705_S001_PaymentRecordsToApprovePage extends WebFlow<EXE705_S001_PaymentRecordsToApprovePage>, StoreAccessor {

    String PAGE_LABEL_DIV = "EXE705el15";
    String TRANSACTION_ID_INPUT = "EXE705_S001_U003";
    String OK_BUTTON = "EXE705_S001_B002";
    String FIRST_TRANSACTION_VERIFICATION_IMG = "EXE705_S001_P002-1";
    String FIRST_TRANSACTION_DETAIL_IMG = "EXE705_S001_P001-1";
    String PAYER_ACCOUNT_NUMBER_DIV = "EXE705_S001_L038";
    String PAYER_ACCOUNT_NUMBER_KEY = "ACCOUNT_NUMBER_OF_THE_PAYER";
    String RECIPIENT_ACCOUNT_NUMBER_DIV = "EXE705_S001_L042";
    String RECIPIENT_ACCOUNT_NUMBER_KEY = "ACCOUNT_NUMBER_OF_THE_RECIPIENT";
    String DUE_DATE_DIV = "EXE705_S001_L039";
    String DUE_DATE_KEY = "DUE_DATE";
    String VARIABLE_SYMBOL_DIV = "EXE705_S001_L046";
    String VARIABLE_SYMBOL_KEY = "VARIABLE_SYMBOL";
    String CONSTANT_SYMBOL_DIV = "EXE705_S001_L047";
    String CONSTANT_SYMBOL_KEY = "CONSTANT_SYMBOL";
    String SPECIFIC_SYMBOL_DIV = "EXE705_S001_L048";
    String SPECIFIC_SYMBOL_KEY = "SPECIFIC SYMBOL";
    String CLOSE_DETAIL = "EXE705_S001_P004";

    @TypeInto(TRANSACTION_ID_INPUT)
    EXE705_S001_PaymentRecordsToApprovePage fillTransactionId(String transactionId);

    @Click(value = OK_BUTTON, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    EXE705_S001_PaymentRecordsToApprovePage clickOk();

    @Click(FIRST_TRANSACTION_VERIFICATION_IMG)
    EXE705_S002_VerificationDataPage clickFirstTransactionVerification();

    @Click(value = FIRST_TRANSACTION_DETAIL_IMG, andWait = @Wait(value = SharedElements.LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    EXE705_S001_PaymentRecordsToApprovePage clickFirstTransactionDetail();

    @StoreElementContent(storeKey = PAYER_ACCOUNT_NUMBER_KEY, value = PAYER_ACCOUNT_NUMBER_DIV)
    EXE705_S001_PaymentRecordsToApprovePage savePayerAccount();

    @StoreElementContent(storeKey = RECIPIENT_ACCOUNT_NUMBER_KEY, value = RECIPIENT_ACCOUNT_NUMBER_DIV)
    EXE705_S001_PaymentRecordsToApprovePage saveRecipientAccount();

    @StoreElementContent(storeKey = DUE_DATE_KEY, value = DUE_DATE_DIV)
    EXE705_S001_PaymentRecordsToApprovePage saveDueDate();

    @StoreElementContent(storeKey = VARIABLE_SYMBOL_KEY, value = VARIABLE_SYMBOL_DIV)
    EXE705_S001_PaymentRecordsToApprovePage saveVariableSymbol();

    @StoreElementContent(storeKey = CONSTANT_SYMBOL_KEY, value = CONSTANT_SYMBOL_DIV)
    EXE705_S001_PaymentRecordsToApprovePage saveConstantSymbol();

    @StoreElementContent(storeKey = SPECIFIC_SYMBOL_KEY, value = SPECIFIC_SYMBOL_DIV)
    EXE705_S001_PaymentRecordsToApprovePage saveSpecificSymbol();

    @Click(CLOSE_DETAIL)
    EXE705_S001_PaymentRecordsToApprovePage clickCloseDetail();
}