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

import cz.moneta.test.dsl.ufo.operations.client.clientDetail.STS701_S002_ClientDetailPage;
import cz.moneta.test.dsl.ufo.operations.ufoOperations.contactForwarding.XCM701_S001_ContactForwardingPage;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.operations.shared.SharedElements.LOAD_IMG_DIV_CLASS;
import static cz.moneta.test.dsl.ufo.operations.ufoOperations.contactForwarding.panels.XCM701_S001_RetentionPanel.SEND_BUTTON;

@Wait(value = SEND_BUTTON, until = Until.VISIBLE)
public interface XCM701_S001_RetentionPanel extends XCM701_S001_ContactForwardingPage {

    String PRODUCT_SELECT = "XCM701_S001_C002";
    String CALENDAR_INPUT = "XCM701_S001_E038";
    String AVAILABILITY_TIME_HOUR_INPUT = "XCM701_S001_E042";
    String AVAILABILITY_TIME_MINUTE_INPUT = "XCM701_S001_E071";
    String TELEPHONE_INPUT = "XCM701_S001_E035";
    String NOTE_INPUT = "XCM701_S001_M005";
    String CALL_AS_PRIORITY_CHECKBOX = "XCM701_S001_H006_1";
    String SEND_BUTTON = "XCM701_S001_B009";

    @Select(PRODUCT_SELECT)
    XCM701_S001_RetentionPanel selectProduct(String product);

    @TypeInto(CALENDAR_INPUT)
    XCM701_S001_RetentionPanel fillDate(String date);

    @TypeInto(AVAILABILITY_TIME_HOUR_INPUT)
    XCM701_S001_RetentionPanel fillAvailabilityTimeHour(String hour);

    @TypeInto(AVAILABILITY_TIME_MINUTE_INPUT)
    XCM701_S001_RetentionPanel fillAvailabilityTimeMinute(String minute);

    @TypeInto(value = TELEPHONE_INPUT, clear = true)
    XCM701_S001_RetentionPanel fillTelephone(String telephone);

    @TypeInto(NOTE_INPUT)
    XCM701_S001_RetentionPanel fillNote(String note);

    @Click(CALL_AS_PRIORITY_CHECKBOX)
    XCM701_S001_RetentionPanel clickCallAsPriority();

    @Click(value = SEND_BUTTON, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    STS701_S002_ClientDetailPage clickSend();

    @CheckElementPresent(SEND_BUTTON)
    XCM701_S001_RetentionPanel checkSendButton();
}