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

import cz.moneta.test.dsl.ufo.operations.client.clientDetail.STS701_S002_ClientDetailPage;
import cz.moneta.test.dsl.ufo.operations.shared.topmenu.XXX702_SharedTopMenu;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.operations.shared.SharedElements.LOAD_IMG_DIV_CLASS;

public interface PLK703_S002_DebitCardBlocationPage extends WebFlow<PLK703_S002_DebitCardBlocationPage>, XXX702_SharedTopMenu<PLK703_S002_DebitCardBlocationPage> {

    String SAVE_BUTTON = "PLK703_S002_B003";
    String BACK_DART_BUTTON = "PLK703_S002_B001";
    String REASON_COMBOBOX_BLOCK = "PLK703_S002_C002";
    String REASON_COMBOBOX_UNBLOCK = "PLK703_S002_C003";
    String CALENDAR_IMAGE = "PLK703_S002_P001";
    String CALENDAR_NEXT_MONTH = "//div[@class='ufo-calendar-mnext']";
    String CALENDAR_REGULAR_DAY = "//div[@id='PLK703_S002_K001']//tr[2]/td[7]";
    String HOLDER_CELL_RADIO = "PLK703_S002_R001_Držitel";
    String SUBMIT_SAVE_BUTTON = "PLK703_S002_B003";
    String UNBLOCK_DEBIT_CARD_BUTTON = "PLK703_S002_B004";
    String CONFIRM_BLOCK_BUTTON = "HLA701_S001_B002";
    String CONFIRM_ALERT_BUTTON = "HLA701_S001_B001";
    String TELEPHONE_NUMBER_TEXTBOX = "PLK703_S002_E007";

    @Wait(value = SAVE_BUTTON, until = Until.VISIBLE)
    @Click(BACK_DART_BUTTON)
    STS701_S002_ClientDetailPage clickBackButton();

    @Wait(value = REASON_COMBOBOX_BLOCK, until = Until.VISIBLE)
    @Select(value = REASON_COMBOBOX_BLOCK)
    PLK703_S002_DebitCardBlocationPage selectReason(String reason);

    @Select(REASON_COMBOBOX_UNBLOCK)
    PLK703_S002_DebitCardBlocationPage selectReasonUnblock(String reason);

    @Click(CALENDAR_IMAGE)
    PLK703_S002_DebitCardBlocationPage clickCalendar();

    @Click(value = CALENDAR_NEXT_MONTH, by = Lookup.XPATH)
    PLK703_S002_DebitCardBlocationPage clickNextMonth();

    @Click(value = CALENDAR_REGULAR_DAY, by = Lookup.XPATH)
    PLK703_S002_DebitCardBlocationPage clickRegularDay();

    @Click(HOLDER_CELL_RADIO)
    PLK703_S002_DebitCardBlocationPage clickHolder();

    @Click(SUBMIT_SAVE_BUTTON)
    PLK703_S002_DebitCardBlocationPage clickSubmitSaveButton();

    @Wait(value = UNBLOCK_DEBIT_CARD_BUTTON, until = Until.CLICKABLE)
    @Click(value = UNBLOCK_DEBIT_CARD_BUTTON)
    PLK703_S002_DebitCardBlocationPage clickUnblockDebitCardButton();

    @Click(value = CONFIRM_BLOCK_BUTTON)
    PLK703_S002_DebitCardBlocationPage clickConfirmBlockButton();

    @Click(CONFIRM_ALERT_BUTTON)
    PLK703_S002_DebitCardBlocationPage clickConfirmAlertButton();

    @TypeInto(value = TELEPHONE_NUMBER_TEXTBOX, clear = true)
    PLK703_S002_DebitCardBlocationPage fillIntoTelephoneNumberBox(String telnumber);

}