package cz.moneta.test.dsl.ufo.operations.client.clientDetail;

import cz.moneta.test.harness.support.web.*;

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

public interface STS701_S002_InfoServiceExpressSettings {

    String INTERNET_PRO_RADIO = "STS701_S002_R002_1";
    String COMMON_USER_RADIO = "STS701_S002_R002_2";
    String CAUTIOUS_USER_RADIO = "STS701_S002_R002_3";
    String SET_BUTTON = "STS701_S002_B076";
    String EMAIL_INPUT_EXPRESS_SETTINGS = "STS701_S002_E022";
    String TELEPHONE_INPUT = "STS701_S002_E019";
    String START_TIME_IN_EXPRESS_SETTINGS_COMBOBOX = "STS701_S002_C022";
    String END_TIME_IN_EXPRESS_SETTINGS_COMBOBOX = "STS701_S002_C023";
    String TEL_OR_EMAIL_DIV_IN_OTHERS_FIRST_ROW = "STS701_S002_L639-1";

    @Click(INTERNET_PRO_RADIO)
    STS701_S002_AdcProductsPanel clickInternetPro();

    @Click(COMMON_USER_RADIO)
    STS701_S002_AdcProductsPanel clickCommonUser();

    @Click(CAUTIOUS_USER_RADIO)
    STS701_S002_AdcProductsPanel clickCautiousUser();

    @Click(SET_BUTTON)
    @AcceptAlert(waitSecondsForAlert = 10)
    STS701_S002_AdcProductsPanel clickSetWithoutTelephoneOrEmailAndCheckAlert();

    @Click(value = SET_BUTTON, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, until = Until.GONE, by = Lookup.CLASSNAME))
    STS701_S002_AdcProductsPanel clickSet();

    @TypeInto(value = EMAIL_INPUT_EXPRESS_SETTINGS, clear = true)
    STS701_S002_AdcProductsPanel fillEmailInputInExpressSettings(String email);

    @TypeInto(TELEPHONE_INPUT)
    STS701_S002_AdcProductsPanel fillTelephoneInputInExpressSettings(String telephone);

    @Select(START_TIME_IN_EXPRESS_SETTINGS_COMBOBOX)
    STS701_S002_AdcProductsPanel selectStartTimeInExpressSettings(String startTime);

    @Select(END_TIME_IN_EXPRESS_SETTINGS_COMBOBOX)
    STS701_S002_AdcProductsPanel selectEndTimeInExpressSettings(String endTime);

    @CheckElementContent(TEL_OR_EMAIL_DIV_IN_OTHERS_FIRST_ROW)
    STS701_S002_AdcProductsPanel checkTelephoneOrEmailDivInCardsFirstRow(String emailOrTelephone);
}
