import { ProductSchema } from '@byondrnd/showroom-schemas';
import { Visualizer } from '../Visualizer';
/** @ignore */
export interface IEventSystem {
    /** once, after the visualizer container is injected */
    containerInjected: IEventsTypes.OnContainerInjected;
    /** once, after the visualizer is loaded */
    visualizerLoaded: IEventsTypes.OnVisualizerLoaded;
    /** every time a scene is loaded */
    sceneLoaded: IEventsTypes.OnSceneLoaded;
    /** every time a scene is loading */
    sceneLoading: IEventsTypes.OnSceneLoading;
    /** every time a product has be added to the scene and finished display */
    productChanged: IEventsTypes.OnProductChanged;
    /** every time a set finished display */
    sceneDisplayed: IEventsTypes.onSceneDisplayed;
    /** every time an hotspot was clicked on the scene */
    hotspotClicked: IEventsTypes.onHotspotClicked;
    /** every time a product was added to favorite */
    productAddedToFavorites: IEventsTypes.onProductAddedToFavorites;
    /** every time a set was added to favorite */
    sceneAddedToFavorites: IEventsTypes.onSceneAddedToFavorites;
    /** every time a product was removed from favorite */
    productRemovedFromFavorites: IEventsTypes.onProductRemovedFromFavorites;
    /** every time a set was removed from favorite */
    sceneRemovedFromFavorites: IEventsTypes.onSceneRemovedFromFavorites;
    /** every time a product was added to cart */
    productAddedToCart: IEventsTypes.onProductAddedToCart;
    /** every time order sample was clicked on scene */
    orderSample: IEventsTypes.onOrderSample;
    /** every time an async operation starts */
    asyncOperationStarted: IEventsTypes.onAsyncOperationStarted;
    /** every time an async operation ends */
    asyncOperationEnded: IEventsTypes.onAsyncOperationEnded;
    /** every time scene is touched */
    sceneTouched: IEventsTypes.onSceneTouched;
    /** every time scene configuration changed */
    sceneConfigurationLabelChanged: IEventsTypes.OnSceneConfigurationLabelChanged;
}
/**@ignore */
export declare type EventSystemEventSignature = keyof IEventSystem;
/**@ignore */
export declare type EventSystemEventTypesSignature = IEventSystem[EventSystemEventSignature];
/**@ignore */
export declare type EventSystemEventDataSignature = Parameters<EventSystemEventTypesSignature>;
export interface IScene {
    experienceId: string;
    sceneId: string;
    id?: string;
    index?: string;
    title: string;
    subtitle: string;
    image: string;
    filters?: Array<IConfigurationFilter>;
}
export interface IFavorite {
    product: IProduct;
}
export interface IFavoriteScene {
    id: string;
    scene: IScene;
    image: string;
    favorites: Array<IFavorite>;
}
export declare type IFavoriteProductList = Array<IFavorite>;
export declare type IFavoriteSceneList = Array<IFavoriteScene>;
export interface IFacet {
    name: string;
    options: string[];
}
export interface IApplication {
    application: string;
    title: string;
    image?: string;
    buttons?: IApplicationButtonsConfiguration;
}
export interface IProduct {
    sku: string;
    title: string;
    description: string;
    image: string;
    application: string;
    price: string;
    facets: IFacet[];
}
export interface ICatalogFieldsMapping {
    title?: string;
    description?: string;
    price?: string;
    facets?: Array<string>;
}
export interface IConfigurationFilter {
    name: string;
    customFieldName?: string;
    options: Array<string>;
}
export interface IConfigurationAlias {
    name: string;
    alias: string;
}
export interface IButtonConfiguration {
    visible?: boolean;
}
export interface IApplicationButtonsConfiguration {
    orderSample?: IButtonConfiguration;
    addToCart?: IButtonConfiguration;
}
export interface IConfigurationCatalogFilters {
    products: {
        customFields: Array<IConfigurationFilter>;
    };
}
export interface ISceneConfigurationEntity {
    theme?: Record<string, any>;
    maxFaceSize?: number;
    label?: string;
    sceneTitle?: string;
    sceneSubtitle?: string;
    catalogFieldsMapping?: ICatalogFieldsMapping;
    catalogFilters?: IConfigurationCatalogFilters;
    applications?: Array<IApplication>;
    fieldsAliases?: Array<IConfigurationAlias>;
    sceneListFilters?: Array<IConfigurationFilter>;
}
export interface ISceneConfiguration {
    defaults?: ISceneConfigurationEntity;
    configurations?: Array<ISceneConfigurationEntity>;
}
export declare abstract class IVisualizer {
    /** start and load the visualizer app, will be triggered automatically on [data-role="visualizer"] elements
     * after complete will emit a "visualizerLoaded" event
     */
    abstract initAndLoad(): Promise<void>;
    /** 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
     *
     * @param sceneId - the sceneId to lunch
     */
    abstract setScene(sceneId: string): Promise<void>;
    /** 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 getCurrentApplication(): IApplication;
    /** will set the current applications
     * @param application - the application to set
     */
    abstract setCurrentApplication(application: IApplication): IApplication;
    /** will return the available filters */
    abstract getFilters(): Array<IConfigurationFilter>;
    /** will return the current filters */
    abstract getCurrentFilters(): Array<IConfigurationFilter>;
    /** will set the current filters
     * @param filters - the filters to set
     */
    abstract setFilter(filters: Array<IConfigurationFilter>): Array<IConfigurationFilter>;
    /** will return the available scene filters */
    abstract getSceneFilters(): Array<IConfigurationFilter>;
    /** will return the current scene filters */
    abstract getSceneCurrentFilters(): Array<IConfigurationFilter>;
    /** will set the current scene filters
     * @param filters - the scene filters to set
     */
    abstract setSceneFilter(filters: Array<IConfigurationFilter>): void;
    /** 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 saved scene
     * will emit a "sceneDisplayed" event after complete
     */
    abstract displayScene(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 "productAddedToFavorites" event
     */
    abstract addProductToFavorites(productSku: string, application: string): IFavoriteProductList;
    /** will remove a product from favorites
     * will emit a "productRemovedFromFavorites" event
     */
    abstract removeProductFromFavorites(productSku: string, application: string): IFavoriteProductList;
    /** will return the favorite products */
    abstract getFavoriteProducts(): IFavoriteProductList;
    /** will add a scene to favorites
     * will emit a "sceneAddedToFavorites" event
     */
    abstract addFavoriteScene(): Promise<IFavoriteSceneList>;
    /** will remove a scene from favorites
     * will emit a "sceneRemovedFromFavorites" event
     */
    abstract removeFavoriteScene(setId: string): IFavoriteSceneList;
    /** will return the favorite set list */
    abstract getFavoriteScenes(): IFavoriteSceneList;
    /** will emit a "productAddedToCart" event */
    abstract addProductToCart(product: IProduct): void;
    /** will emit a "orderSample" event */
    abstract orderSample(product: IProduct): void;
}
/**@ignore */
export declare class VisualizerElement extends Element {
    Visualizer: Visualizer;
}
/**
 * events when using addEventListener on the visualizer element
 * for example:
 * ```typescript
 * const handleOnSceneLoaded = ({ scene }) => {
 *  console.log('sceneLoaded', scene);
 * };
 * visualizerApp.on('sceneLoaded', handleOnSceneLoaded);
 * ```
 */
export declare namespace IEventsTypes {
    /**@event */
    type OnContainerInjected = (eventData: {
        visualizer: Visualizer;
    }) => void;
    /**@event */
    type OnVisualizerLoaded = (eventData: {
        visualizer: Visualizer;
    }) => void;
    /**@event */
    type OnSceneLoaded = (eventData: {
        scene: IScene;
    }) => void;
    type OnSceneLoading = (eventData: {
        sceneConfiguration: ISceneConfigurationEntity;
    }) => void;
    /**@event */
    type OnProductChanged = (eventData: {
        product: ProductSchema.IProduct;
    }) => void;
    /**@event */
    type onSceneDisplayed = (eventData: {
        scene: IFavoriteScene;
    }) => void;
    /**@event */
    type onHotspotClicked = (eventData: {
        application: IApplication;
    }) => void;
    /**@event */
    type onProductAddedToFavorites = (eventData: {
        favorites: IFavoriteProductList;
        product: IProduct;
    }) => void;
    /**@event */
    type onSceneAddedToFavorites = (eventData: {
        favoriteScenes: IFavoriteSceneList;
        scene: IFavoriteScene;
    }) => void;
    /**@event */
    type onProductRemovedFromFavorites = (eventData: {
        favorites: IFavoriteProductList;
        product: IProduct;
    }) => void;
    /**@event */
    type onSceneRemovedFromFavorites = (eventData: {
        favoriteScenes: IFavoriteSceneList;
        scene: IFavoriteScene;
    }) => void;
    /**@event */
    type onProductAddedToCart = (eventData: {
        product: IProduct;
    }) => void;
    /**@event */
    type onOrderSample = (eventData: {
        product: IProduct;
    }) => void;
    /**@event */
    type onAsyncOperationStarted = (eventData: {
        processId: string;
    }) => void;
    /**@event */
    type onAsyncOperationEnded = (eventData: {
        processId: string;
    }) => void;
    /**@event */
    type onSceneTouched = () => void;
    /**@event */
    type OnSceneConfigurationLabelChanged = () => void;
}
/**
 * events when using on/off on the visualizer instance
 * for example:
 * ```typescript
 * const onVisualizerLoaded = ({ detail }) => {
 *  const visualizerApp: Visualizer = detail.visualizer;
 *  const applications = visualizerApp.GetApplicationsList();
 *  console.log(applications);
 * };
 * const containerElement = document.querySelector('.visualizer');
 * containerElement.addEventListener('visualizerLoaded', onVisualizerLoaded);
 * ```
 */
export declare namespace IEventsTypesListeners {
    /**@event */
    type OnContainerInjected = (event: CustomEvent & {
        detail: {
            visualizer: Visualizer;
        };
    }) => void;
    /**@event */
    type OnVisualizerLoaded = (event: CustomEvent & {
        detail: {
            visualizer: Visualizer;
        };
    }) => void;
    /**@event */
    type OnSceneLoaded = (event: CustomEvent & {
        detail: {
            scene: IScene;
            sceneConfiguration: ISceneConfigurationEntity;
        };
    }) => void;
    type OnSceneLoading = (event: CustomEvent & {
        detail: {
            sceneConfiguration: ISceneConfigurationEntity;
        };
    }) => void;
    /**@event */
    type OnProductChanged = (event: CustomEvent & {
        detail: {
            product: ProductSchema.IProduct;
        };
    }) => void;
    /**@event */
    type onSceneDisplayed = (event: CustomEvent & {
        detail: {
            scene: IFavoriteScene;
        };
    }) => void;
    /**@event */
    type onHotspotClicked = (event: CustomEvent & {
        detail: {
            application: IApplication;
        };
    }) => void;
    /**@event */
    type onProductAddedToFavorites = (event: CustomEvent & {
        detail: {
            favorites: IFavoriteProductList;
            product: IProduct;
        };
    }) => void;
    /**@event */
    type onSceneAddedToFavorites = (event: CustomEvent & {
        detail: {
            favoriteScenes: IFavoriteSceneList;
            scene: IFavoriteScene;
        };
    }) => void;
    /**@event */
    type onProductRemovedFromFavorites = (event: CustomEvent & {
        detail: {
            favorites: IFavoriteProductList;
            product: IProduct;
        };
    }) => void;
    /**@event */
    type onSceneRemovedFromFavorites = (event: CustomEvent & {
        detail: {
            favoriteScenes: IFavoriteSceneList;
            scene: IFavoriteScene;
        };
    }) => void;
    /**@event */
    type onProductAddedToCart = (event: CustomEvent & {
        detail: {
            product: IProduct;
        };
    }) => void;
    /**@event */
    type onOrderSample = (event: CustomEvent & {
        detail: {
            product: IProduct;
        };
    }) => void;
    /**@event */
    type onAsyncOperationStarted = (event: CustomEvent & {
        detail: {
            processId: string;
        };
    }) => void;
    /**@event */
    type onAsyncOperationEnded = (event: CustomEvent & {
        detail: {
            processId: string;
        };
    }) => void;
    /**@event */
    type onSceneTouched = () => void;
    /**@event */
    type OnSceneConfigurationLabelChanged = () => void;
}
