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

import cz.moneta.test.dsl.ufo.operations.client.clientDetail.STS701_S002_ClientDetailPage;
import cz.moneta.test.dsl.ufo.operations.shared.SharedElements;
import cz.moneta.test.dsl.ufo.operations.ufoOperations.contactForwarding.panels.*;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.ufo.UfoEndpoint;
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.XCM701_S001_ContactForwardingPage.PAGE_LABEL;

@Wait(PAGE_LABEL)
public interface XCM701_S001_ContactForwardingPage extends WebFlow<XCM701_S001_ContactForwardingPage>, StoreAccessor {

    String PAGE_LABEL = "XCM701_S001_L001";

    String BACK_DART_BUTTON = "XCM701_S001_P003";
    String CAR_BUTTON_XPATH = "//button[contains(@title, 'XCM701_S001_I004')]";
    String FUTURE_OPPORTUNITIES_XPATH = "//button[contains(@title, 'XCM701_S001_I007')]";
    String MORTGAGES_XPATH = "//button[contains(@title, 'XCM701_S001_I002')]";
    String RETENTION_BUTTON_XPATH = "//button[contains(@title, 'XCM701_S001_I005')]";
    String SME_BUTTON_XPATH = "//button[contains(@title, 'XCM701_S001_I003')]";
    String E_COMM_XPATH = "//button[contains(@title, 'XCM701_S001_I001')]";
    String SELL_XPATH = "//button[contains(@title, 'XCM701_S001_I008')]";
    String ACQUISITION_XPATH = "//button[contains(@title, 'XCM701_S001_I009')]";
    String OTHER_XPATH = "//button[contains(@title, 'XCM701_S001_I011')]";
    String CONSENT_101_ALERT_TEXT = "Přečtěte klientovi souhlas se 101: Souhlasíte s předáním Vašich údajů kolegům, aby Vás mohli kontaktovat?";

    @Click(value = CAR_BUTTON_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_CarPanel clickCar();

    @Click(value = FUTURE_OPPORTUNITIES_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_FutureOpportunitiesPanel clickFutureOpportunities();

    @Click(value = MORTGAGES_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_MortgagesPanel clickMortgages();

    @Click(value = RETENTION_BUTTON_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_RetentionPanel clickRetention();

    @Click(value = SME_BUTTON_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_SMEPanel clickSME();

    @Click(value = E_COMM_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_EcommPanel clickEcomm();

    @Click(value = SELL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_SellPanel clickSell();

    @Click(value = ACQUISITION_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_AcquisitionPanel clickAcquisition();

    @Click(value = OTHER_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XCM701_S001_OtherPanel clickOther();

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

}