import { TypedEmitter } from 'tiny-typed-emitter';
import { ProductSchema } from '@byondrnd/showroom-schemas';
import { Visualizer } from '../Visualizer';
declare type OnVisualizerLoaded = (eventData: {
    visualizer: Visualizer;
}) => void;
declare type OnSceneLoaded = (eventData: {
    scene: IScene;
}) => void;
declare type OnProductChanged = (eventData: {
    product: ProductSchema.IProduct;
}) => void;
declare type onSetDisplayed = (eventData: {
    set: IFavoriteSet;
}) => void;
declare type onHotspotClicked = (eventData: {
    application: IApplication;
}) => void;
declare type onProductAddedToFavorite = (eventData: {
    favorites: IFavoriteProductList;
    product: IProduct;
}) => void;
declare type onSetAddedToFavorite = (eventData: {
    favoritesSet: IFavoriteSetList;
    set: IFavoriteSet;
}) => void;
declare type onProductRemovedFromFavorite = (eventData: {
    favorites: IFavoriteProductList;
    product: IProduct;
}) => void;
declare type onSetRemovedFromFavorite = (eventData: {
    favoritesSet: IFavoriteSetList;
    set: IFavoriteSet;
}) => void;
declare type onProductAddedToCart = (eventData: {
    product: IProduct;
}) => void;
declare type onOrderSample = (eventData: {
    product: IProduct;
}) => void;
interface IEventSystem {
    /** once, after the visualizer is loaded */
    visualizerLoaded: OnVisualizerLoaded;
    /** every time a scene is loaded */
    sceneLoaded: OnSceneLoaded;
    /** every time a product has be added to the scene and finished display */
    productChanged: OnProductChanged;
    /** every time a set finished display */
    setDisplayed: onSetDisplayed;
    /** every time an hotspot was clicked on the scene */
    hotspotClicked: onHotspotClicked;
    /** every time a product was added to favorite */
    productAddedToFavorite: onProductAddedToFavorite;
    /** every time a set was added to favorite */
    setAddedToFavorite: onSetAddedToFavorite;
    /** every time a product was removed from favorite */
    productRemovedFromFavorite: onProductRemovedFromFavorite;
    /** every time a set was removed from favorite */
    setRemovedFromFavorite: onSetRemovedFromFavorite;
    /** every time a product was added to cart */
    productAddedToCart: onProductAddedToCart;
    /** every time order sample was clicked on scene */
    orderSample: onOrderSample;
}
export declare type EventSystemEventSignature = keyof IEventSystem;
export declare type EventSystemEventDataSignature = Parameters<IEventSystem[EventSystemEventSignature]>;
export declare type IScene = {
    id: string;
    index: string;
    title: string;
    subtitle: string;
    image: string;
};
export declare type IFavorite = {
    product: IProduct;
};
export declare type IFavoriteSet = {
    id: string;
    scene: IScene;
    image: string;
    favorites: Array<IFavorite>;
};
export declare type IFavoriteProductList = Array<IFavorite>;
export declare type IFavoriteSetList = Array<IFavoriteSet>;
export declare type IFacet = {
    name: string;
    options: string[];
};
export declare type IFilter = IFacet;
export declare type IApplication = {
    application: string;
    image?: string;
};
export declare type IProduct = {
    sku: string;
    title: string;
    description: string;
    image: string;
    application: string;
    price: string;
    facets: IFacet[];
};
export interface IVisualizerConfig {
    containerSelector: string;
    experienceId: string;
    sceneId?: string;
}
export declare abstract class EventSystem extends TypedEmitter<IEventSystem> {
    /** start and load the visualizer app, will be triggered automatically on [data-role="visualizer"] elements
     * after complete will emit a "visualizerLoaded" event
     */
    abstract initAndLoad(): any;
    /** will return the scene list available in this experience */
    abstract getSceneList(): Array<IScene>;
    /** will set the current scene
     * after complete will emit a "sceneLoaded" event
     */
    abstract setScene(sceneId: string): any;
    /** will return products list according to the current application and filters */
    abstract GetProductList(): Array<IProduct>;
    /** will return applications available on this experience */
    abstract GetApplicationsList(): Array<IApplication>;
    /** will return the current applications */
    abstract GetApplication(): IApplication;
    /** will set the current applications */
    abstract SetApplication(application: IApplication): IApplication;
    /** will return the available filters */
    abstract GetFilters(): Array<IFilter>;
    /** will return the current filters */
    abstract GetFilter(): Array<IFilter>;
    /** will set the current filters */
    abstract SetFilter(filters: Array<IFilter>): Array<IFilter>;
    /** will set a product on a specific application
     * will emit a "productChanged" event after complete
     */
    abstract displayProduct(productSku: string, application: IApplication): Promise<void>;
    /** will display a set
     * will emit a "sceneLoaded" event after complete
     */
    abstract displaySet(setId: string): Promise<void>;
    /** will return the product displayed on an application in the current scene */
    abstract getDisplayedProduct(application: IApplication): IProduct;
    /** will return all displayed products in the current scene*/
    abstract getDisplayedProducts(): Array<IProduct>;
    /** will add a product to favorites
     * will emit a "productAddedToFavorite" event
     */
    abstract addProductToFavorite(productSku: string, application: IApplication): IFavoriteProductList;
    /** will remove a product to favorites
     * will emit a "productRemovedFromFavorite" event
     */
    abstract removeProductFromFavorite(productSku: string, application: IApplication): IFavoriteProductList;
    /** will return the favorite list */
    abstract getProductFavoriteList(): IFavoriteProductList;
    /** will add a set to favorites
     * will emit a "setAddedToFavorite" event
     */
    abstract addSetToFavorite(): Promise<IFavoriteSetList>;
    /** will remove a set from favorites
     * will emit a "setRemovedFromFavorite" event
     */
    abstract removeSetFromFavorite(setId: string): IFavoriteSetList;
    /** will return the favorite set list */
    abstract getSetFavoriteList(): IFavoriteSetList;
    /** will emit a "productAddedToCart" event */
    abstract addProductToCart(product: IProduct): any;
    /** will emit a "orderSample" event */
    abstract orderSample(product: IProduct): any;
}
export {};
