package cz.moneta.test.dsl.ufo.operations.shared.topmenu;

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

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

public interface XXX702_SharedClientMenu<T extends WebFlow<T>> extends XXX702_ClientDetail<T>, XXX702_Sale<T>, XXX702_ContactInformations<T>, XXX702_Offers<T>, XXX702_Requirements<T>, XXX702_Tasks<T>, XXX702_Applications<T>, XXX702_Notices<T> {

    String CLIENT_DETAIL_PANEL_XPATH = "//button [contains(@title, '[XXX702_T001_I006]')]";
    String SALE_PANEL_XPATH = "//button[contains(@title, '[XXX702_T001_I010]')]";
    String CONTACT_INFORMATIONS_PANEL_XPATH = "//button [contains(@title, '[XXX702_T001_I011]')]";
    String OFFERS_PANEL_XPATH = "//button[contains(@title, '[XXX702_T001_I014]')]";
    String REQUIREMENT_PANEL_XPATH = "//button[contains(@title, '[XXX702_T001_I015]')]";
    String TASKS_PANEL_XPATH = "//button[contains(@title, '[XXX702_T001_I016]')]";
    String APPLICATIONS_PANEL_XPATH = "//button[contains(@title, '[XXX702_T001_I018')]";
    String NOTICES_PANEL_XPATH = "//button[contains(@title, '[XXX702_T001_I019]')]";

    String CLIENT_DETAIL_BUTTON = "XXX702_T001_B016";
    String CLIENT_CONSENTS_BUTTON = "XXX702_T001_P046";
    String CHANGE_CONTACT_DATA_BUTTON = "XXX702_T001_P047";


    @Wait(value = CLIENT_DETAIL_PANEL_XPATH, by = Lookup.XPATH, until = Until.CLICKABLE)
    @Click(value = CLIENT_DETAIL_PANEL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XXX702_ClientDetail<T> menuClickClientDetailPanel();

    @Wait(value = SALE_PANEL_XPATH, by = Lookup.XPATH, until = Until.CLICKABLE)
    @Click(value = SALE_PANEL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XXX702_Sale<T> menuClickClientSale();

    @Wait(value = CONTACT_INFORMATIONS_PANEL_XPATH, by = Lookup.XPATH, until = Until.CLICKABLE)
    @Click(value = CONTACT_INFORMATIONS_PANEL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XXX702_ContactInformations<T> menuClickClientContactInformations();

    @Wait(value = OFFERS_PANEL_XPATH, by = Lookup.XPATH, until = Until.CLICKABLE)
    @Click(value = OFFERS_PANEL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XXX702_Offers<T> menuClickClientOffers();

    @Wait(value = REQUIREMENT_PANEL_XPATH, by = Lookup.XPATH, until = Until.CLICKABLE)
    @Click(value = REQUIREMENT_PANEL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XXX702_Requirements<T> menuClickClientRequirements();

    @Wait(value = TASKS_PANEL_XPATH, by = Lookup.XPATH, until = Until.CLICKABLE)
    @Click(value = TASKS_PANEL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XXX702_Tasks<T> menuClickClientTasks();

    @Wait(value = APPLICATIONS_PANEL_XPATH, by = Lookup.XPATH, until = Until.CLICKABLE)
    @Click(value = APPLICATIONS_PANEL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XXX702_Applications<T> menuClickClientApplications();

    @Wait(value = NOTICES_PANEL_XPATH, by = Lookup.XPATH, until = Until.CLICKABLE)
    @Click(value = NOTICES_PANEL_XPATH, by = Lookup.XPATH, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    XXX702_Notices<T> menuClickClientNotices();


    @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE)
    @Click(value = CLIENT_DETAIL_BUTTON)
    STS701_S002_ClientDetailPage menuClickClientDetailButton();

    @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE)
    @Click(CLIENT_CONSENTS_BUTTON)
    STO704_S001_ClientConsentsPage menuClickClientConsents();

    @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE)
    @Click(CHANGE_CONTACT_DATA_BUTTON)
    ZKU704_S001_ChangeContactData menuClickChangeContactData();

}