import { Observable } from 'rxjs';

type ApplicationDeviceTypes = 'deviceTypeAuto' | 'deviceTypeMobile' | 'deviceTypeDesktop';

declare const Metabox = "metabox_v3";
declare const MetaboxHost = "metaboxHost_v3";
declare const MetaboxData = "metaboxData_v3";
declare const AppLoaded = "appLoaded_v3";
declare const MetaboxDomain = "metabox.3dsource.com";
declare const BasicRouteUrl = "metabox-configurator/modular";

declare const VERSION = "3.0.9";

type FromMetaboxApiAction = 'bridge' | typeof AppLoaded;

interface IntegrateMetaboxConfig {
    standalone?: boolean;
    loadingImage?: string;
    introVideo?: string;
    introImage?: string;
    state?: string;
    domain?: string;
}
interface MetaboxCommandConfig {
    standalone?: boolean;
    hostUrl: string;
    apiVersion: string;
}

declare const MetaboxModularConfiguratorActions: {
    readonly metaboxConfig: "metaboxConfig";
    readonly setEnvironment: "setEnvironment";
    readonly setEnvironmentMaterialById: "setEnvironmentMaterialById";
    readonly setComponent: "setComponent";
    readonly setComponentMaterialById: "setComponentMaterialById";
    readonly getPdf: "getPdf";
    readonly getCallToActionInformation: "getCallToActionInformation";
    readonly getScreenshot: "getScreenshot";
    readonly showEmbeddedMenu: "showEmbeddedMenu";
    readonly forceSetDeviceType: "forceSetDeviceType";
    readonly showOverlayInterface: "showOverlayInterface";
    readonly resetCamera: "resetCamera";
    readonly applyZoom: "applyZoom";
    readonly initShowcase: "initShowcase";
    readonly playShowcase: "playShowcase";
    readonly pauseShowcase: "pauseShowcase";
    readonly stopShowcase: "stopShowcase";
    readonly sendCommandToUnreal: "sendCommandToUnreal";
};
type ToMetaBoxActions = (typeof MetaboxModularConfiguratorActions)[keyof typeof MetaboxModularConfiguratorActions];
/**
 * @internal
 * @hidden
 */
type ToMetaboxMessagePayload = ToMetaboxMessagePayloads[keyof ToMetaboxMessagePayloads];
type Test = Record<ToMetaBoxActions, object>;
/**
 * Interface for messages sent from the application to the Metabox Modular Configurator.
 */
interface ToMetaboxMessagePayloads {
    [MetaboxModularConfiguratorActions.metaboxConfig]: {
        appId: string;
        config: MetaboxCommandConfig;
    };
    [MetaboxModularConfiguratorActions.setEnvironment]: {
        id: string;
    };
    [MetaboxModularConfiguratorActions.setEnvironmentMaterialById]: {
        slotId: string;
        materialId: string;
    };
    [MetaboxModularConfiguratorActions.setComponent]: {
        id: string;
        typeId: string;
        isRoot: boolean;
    };
    [MetaboxModularConfiguratorActions.setComponentMaterialById]: {
        componentId: string;
        slotId: string;
        materialId: string;
    };
    [MetaboxModularConfiguratorActions.getScreenshot]: {
        format: MimeType;
        size?: {
            x: number;
            y: number;
        };
    };
    [MetaboxModularConfiguratorActions.getCallToActionInformation]: void;
    [MetaboxModularConfiguratorActions.getPdf]: void;
    [MetaboxModularConfiguratorActions.showEmbeddedMenu]: {
        visible: boolean;
    };
    [MetaboxModularConfiguratorActions.showOverlayInterface]: {
        visible: boolean;
    };
    [MetaboxModularConfiguratorActions.forceSetDeviceType]: {
        deviceType: ApplicationDeviceTypes;
    };
    [MetaboxModularConfiguratorActions.resetCamera]: void;
    [MetaboxModularConfiguratorActions.applyZoom]: {
        zoom: number;
    };
    [MetaboxModularConfiguratorActions.initShowcase]: void;
    [MetaboxModularConfiguratorActions.playShowcase]: void;
    [MetaboxModularConfiguratorActions.pauseShowcase]: void;
    [MetaboxModularConfiguratorActions.stopShowcase]: void;
    [MetaboxModularConfiguratorActions.sendCommandToUnreal]: object;
}
interface ToMetaBoxMessageEnvelope {
    action: ToMetaBoxActions;
    payload?: ToMetaboxMessagePayload | never;
}
interface ToMetaBoxMessage {
    host: typeof MetaboxHost;
    payload: ToMetaBoxMessageEnvelope;
}

/**
 * Represents a modular configurator envelope with an initial configurator, and changes contain a configuration tree,
 * all components by active component type, component selected materials,
 * and associated environment.
 */
interface ModularConfiguratorEnvelope {
    /**
     * Represents the modular configurator api with its components, component types, and environments
     * */
    configurator: InitialModularConfigurator;
    /** The unique tree of components and parent and component type id */
    configurationTree: ComponentWithParent[];
    /** A record mapping all components by current component type */
    componentsByComponentType: Record<string, string>;
    /** A record mapping component material selection */
    componentMaterialsIds: SelectedIds;
    /** The unique environment identifier */
    environmentId: string;
    /** A record mapping environment material selections */
    environmentMaterialsIds: SelectedIds;
}
/**
 * Represents the modular configurator api with its components, component types, and environments
 * */
interface InitialModularConfigurator {
    /** Unique identifier for the configurator. */
    id: string;
    /** Client information associated with the configurator. */
    /** The name of the configurator. */
    name: string;
    /** A list of components for the configurator. */
    components: ModularConfiguratorComponent[];
    /** A list of available environments. */
    environments: ModularConfiguratorEnvironment[];
    /** A list of a component type for the configurator. */
    componentTypes: ModularConfiguratorComponentType[];
    /** Indicates if the configurator is active. */
    isActive: boolean;
    /** Indicates if the cta in ecom configurator is enabled or not. */
    ctaEnabled: boolean;
    /** A list of available connectors shows connections between all component types. */
    connectors: ModularConfiguratorConnector[];
    /** GraphQL typename for the Modular Configurator. */
    __typename: 'ModularConfigurator';
}
/**
 * Represents a configurator component within the modular configurator.
 */
interface ModularConfiguratorComponent {
    /** The id unique identifier. */
    id: string;
    /** The modular configurator component type identifier. */
    componentType: ModularConfiguratorComponentType;
    /** Display the name for the product. */
    name: string;
    /** Position index of the product. */
    position: number;
    /** The detailed product information. */
    product: Product;
    /** Connectors between connectors and virtual sockets. */
    virtualSocketToConnectorsMap?: ModularConfiguratorVirtualSocketToConnector[];
    /** GraphQL typename for the component. */
    __typename: 'ModularConfiguratorComponent';
}
/**
 * Represents a component type within the modular configurator.
 */
interface ModularConfiguratorComponentType {
    /** Display the name for the component type. */
    name: string;
    /** Position index of the component type. */
    position: number;
    /** Is root current component type or not. */
    isRoot: boolean;
    /** Is required current component type or not. */
    isRequired: boolean;
    /** The id unique identifier. */
    id: string;
    /** GraphQL typename for the component type. */
    __typename: 'ModularConfiguratorComponentType';
}
/**
 * Represents a vur virtual map socket to connectors the modular configurator.
 */
interface ModularConfiguratorVirtualSocketToConnector {
    virtualSocketId: string;
    connectorId: string;
    /** GraphQL typename for the virtual map socket. */
    __typename: 'ModularConfiguratorVirtualSocketToConnector';
}
/**
 * Represents a connector the modular configurator.
 */
interface ModularConfiguratorConnector {
    id: string;
    componentTypeId1: string;
    componentTypeId2: string;
    /** GraphQL typename for connector. */
    __typename: 'ModularConfiguratorConnector';
}
/**
 * Represents product details including visual assets and configuration.
 */
interface Product {
    /** The title of the product. */
    title: string;
    /** List of thumbnails for the product. */
    thumbnailList: Thumbnail[];
    /** Available slots for the product. */
    slots: Slot[];
    /** List of metaProperties for the product (optional). */
    metaProperties: MetaProperty[];
    /** The model information associated with the product. */
    /** Unique identifier for the product. */
    id: string;
    /** Unique external id for the product. */
    externalId: string;
    /** Showcase details for the product. */
    showcase?: Showcase;
    /** GraphQL typename for the product. */
    __typename: 'Product';
}
/**
 * Represents a thumbnail image entity with dimensions and URL path.
 */
interface Thumbnail {
    /** Width of the thumbnail. */
    width: number;
    /** Height of the thumbnail. */
    height: number;
    /** URL path to the thumbnail image. */
    urlPath: string;
    /** GraphQL typename (as a string, flexible type). */
    __typename: 'Thumbnail';
}
/**
 * Represents a slot within a product that may allow material customization.
 */
interface Slot {
    /** Unique identifier for the slot. */
    id: string;
    /** Display a label for the slot. */
    label: string;
    /** A list of enabled materials for the slot. */
    enabledMaterials: Material[];
    /** GraphQL typename for the slot. */
    __typename: 'Slot';
}
/**
 * Represents a metaProperty within a product that may allow business logic customization.
 */
interface MetaProperty {
    /** Unique identifier for the metaProperty. */
    id: string;
    /** Display the name for the metaProperty. */
    name: string;
    /**  Value for the metaProperty. */
    value: string;
    /**  Type for the metaProperty. */
    type: string;
    /** GraphQL typename for the metaProperty. */
    __typename: 'MetaProperty';
}
/**
 * Represents a material that can be applied to a product slot.
 */
interface Material {
    /** Unique identifier for the material. */
    id: string;
    /** Title or name of the material. */
    title: string;
    /** Unique external id for the material. */
    externalId: string;
    /** List of thumbnails for the material. */
    thumbnailList: Thumbnail[];
    /** The model information associated with the material. */
    /** GraphQL typename for the material. */
    __typename: 'Material';
}
/**
 * Details showcase the presentation of a product.
 */
interface Showcase {
    /** A list of low-bandwidth versions for the showcase (optional). */
    lowBandwidth?: (Timecode | null)[] | null;
    /** Duration for the showcase (optional). */
    duration?: number;
    /** GraphQL typename for the showcase. */
    __typename: 'Showcase';
}
/**
 * Represents a low-bandwidth entity used in showcases in LBM mode.
 */
interface Timecode {
    /** Time marker for the entity. */
    time: number;
    /** Duration of the entity display. */
    duration: number;
    /** GraphQL typename (as a string, flexible type). */
    __typename: 'Timecode';
}
/**
 * Represents the environment settings for a modular configurator.
 */
interface ModularConfiguratorEnvironment {
    /** Unique identifier for the environment. */
    environmentId: string;
    /** Position index of the environment. */
    position: number;
    /** Display label for the environment. */
    label: string;
    /** Detailed environment configuration. */
    environment: Environment;
    /** GraphQL typename for the environment. */
    __typename: 'ModularConfiguratorEnvironment';
}
/**
 * Represents an environment with associated media and configuration.
 */
interface Environment {
    /** Unique identifier for the environment. */
    id: string;
    /** Title or name of the environment. */
    title: string;
    /** Flag indicating if UDS is enabled. */
    udsEnabled: boolean;
    /** The north yaw of the sun in the environment. */
    sunNorthYaw: number;
    /** The UDS hour setting for the environment. */
    udsHour: number;
    /** List of thumbnails for the environment (optional). */
    thumbnailList: Thumbnail[];
    /** List of slots for the environment (optional). */
    slots: Slot[];
    /** The model associated with the environment. */
    /** GraphQL typename for the environment. */
    __typename: 'Environment';
}
/**
 * Defines the structure for a component tree where every component has id and parent.
 */
interface ComponentWithParent {
    id: string;
    componentTypeId: string;
    parentId: string | null;
}
/**
 * Defines the structure for a mapping of selected materials.
 */
type SelectedIds = Record<string, Record<string, string>>;
/**
 * Defines the structure for an available showcase status for the current product on a scene.
 */
type ShowCaseStatus = 'init' | 'play' | 'pause' | 'stop';
/**
 * Defines the structure for a video resolution.
 */
interface VideoResolution {
    width: number | null;
    height: number | null;
}

/** Represents an ecom configurator object with all necessary information about cta */
interface EcomConfigurator {
    /** The unique ecom configurator identifier. */
    id: string;
    /** The created data of ecom configurator. */
    createdAt: string;
    /** A reference to the Call To Action Information. */
    cta?: Cta;
    /** GraphQL typename for the ecom configurator. */
    __typename: 'Configurator';
}
/**
 * Represents the call-to-action information for an ecom configurator.
 */
interface Cta {
    /** The indicator of whether the call-to-action is enabled or not. */
    enabled: boolean;
    /** Label of button for call-to-action. */
    label: string;
    /** Callback URL using for sent configurator selected information to this url and redirected to the url after get response. */
    callbackUrl: string;
    /** GraphQL typename for the CTA object. */
    __typename: 'Cta';
}

interface FromMetaboxMessagePayloads {
    /**
     * Dispatches every time the configurator data is updated.
     * I.e., when the user changes the configuration. (Material, Component Tree, Components, Component Type, Environment)
     */
    configuratorDataUpdated: ModularConfiguratorEnvelope;
    /**
     * Dispatches every time the ecom configurator data is updated (label, endpointUrl).
     */
    ecomConfiguratorDataUpdated: EcomConfigurator;
    /**
     * Dispatches every time when while the configurator loads. Shows showcase status information on a scene.
     */
    showcaseStatusChanged: ShowCaseStatus;
    /**
     * Dispatches every time when the configurator connected/disconnected with Unreal Engine.
     */
    dataChannelConnected: boolean;
    /**
     * Dispatches every time when the Viewport is ready / not ready.
     */
    viewportReady: boolean;
    /**
     * Dispatches at the moment while the configurator loads. Shows status information.
     */
    statusMessageChanged: string | null;
    /**
     * Dispatches every time when Unreal is sending ordered render with new GetScreenshot() command.
     */
    screenshotReady: string | null;
    /**
     * Dispatches every time when Unreal is changing its video stream size.
     */
    videoResolutionChanged: VideoResolution;
}
/**
 * @hidden
 */
type FromMetaBoxApiEvents = keyof FromMetaboxMessagePayloads;
/**
 * @internal
 * This creates all event envelopes defined in MetaBoxAPIPayloads.
 */
interface MetaBoxApiEnvelope<T extends FromMetaBoxApiEvents> {
    action: 'bridge';
    eventType: T;
    payload: FromMetaboxMessagePayloads[T];
}
type MetaboxEnvironment = 'metabox' | 'host';
/**
 * @hidden
 * @internal
 * Used for signaling that the app is loaded and ready to open api.
 */
interface MCAppLoaded {
    action: typeof AppLoaded;
    eventType?: unknown;
    payload: {
        appId: string;
        version?: string;
    };
}
/**
 * @internal
 * @hidden
 * This creates a union of all event envelopes defined in MetaBoxAPIPayloads.
 */
type FromMetaBoxAPIEnvelope = {
    [K in keyof FromMetaboxMessagePayloads]: MetaBoxApiEnvelope<K>;
}[keyof FromMetaboxMessagePayloads] | MCAppLoaded;
interface FromMetaBoxMessage {
    host: typeof Metabox;
    envelope: FromMetaBoxAPIEnvelope;
}

/**
 * Base class for commands sent to the Metabox.
 */
declare class CommandBase {
    data: ToMetaBoxMessageEnvelope;
}

/**
 * Represents a command to ApplyZoom and change zoom camera on a scene.
 * @remarks
 * This class sends a command to the Metabox API to change zoom on a scene.
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * import { ApplyZoom, Communicator } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *     api.sendCommandToMetabox(new ApplyZoom(10));
 *     api.sendCommandToMetabox(new ApplyZoom(-10));
 * };
 */
declare class ApplyZoom extends CommandBase {
    /**
     * Creates an instance of ApplyZoom.
     *
     * @param {...number} zoom
     */
    constructor(zoom: number);
}

/**
 * Represents a callback listener for specific message types.
 * Used internally by EventDispatcher to store event listeners.
 *
 * @public
 */
interface Listener {
    /** The message type this listener is registered for */
    messageType: string;
    /** The callback function to execute when a message of the specified type is received */
    callback: (data: unknown) => void;
}
/**
 * EventDispatcher is a class that manages event listeners and dispatches events to them.
 */
declare class EventDispatcher {
    /**
     * Storage for callback listeners by message type.
     */
    listeners: Listener[];
    destroy(key: string): void;
    /**
     * Adds an event listener for receiving specific types of messages.
     *
     * @param {string} messageType - The message type to listen for.
     * @param callback - The callback function to execute when a message is received.
     */
    addEventListener(messageType: string, callback: (data: unknown) => void): this;
    /**
     * Dispatches an event to all listeners of a specific message type.
     *
     * @param {string} messageType - The message type.
     * @param data - The data associated with the event.
     */
    dispatchEvent(messageType: string, data: unknown): this;
    /**
     * Removes an event listener for a specific type of message.
     *
     * @param {string} messageType - The message type.
     * @param callback - The callback function to remove.
     */
    removeEventListener(messageType: string, callback: (data: unknown) => void): this;
}

/**
 * Handles messaging between the host page and embedded to the Metabox content.
 * @internal Use {@link Communicator.createInstance} or the {@link integrateMetabox} helper to instantiate.
 */
declare class Communicator extends EventDispatcher {
    /**
     * Singleton reference to the current communicator instance.
     */
    static instance: Communicator | null;
    /**
     * Bound handler for incoming postMessage events.
     */
    private binder;
    /**
     * Constructs a Communicator, replacing any existing instance, and begins listening for messages.
     * @internal
     */
    constructor(data: MCAppLoaded['payload'], environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>);
    /**
     * Listens for Metabox to signal readiness, then initializes communicator.
     * @param apiReadyCallback - Called with the new Communicator once to the Metabox is loaded.
     * @param {MetaboxEnvironment} environment - The environment in which the Communicator is running.
     * @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
     */
    static createInstance(apiReadyCallback: (api: Communicator) => void, environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>): void;
    /**
     * Cleans up resources and stops listening for messages.
     */
    destroy(key: string): void;
    static clearAll(): void;
    static getCommunicator(key: string): {
        instance: Communicator;
    } | undefined;
    /**
     * Posts a command to the Metabox iframe.
     * @param command - An action command containing data to send.
     */
    sendCommandToMetabox<T extends CommandBase>(command: T): void;
    /**
     * Registers an event listener for messages dispatched by Metabox.
     * @override
     */
    addEventListener<T extends FromMetaBoxApiEvents>(messageType: T, callback: (data: FromMetaboxMessagePayloads[T]) => void): this;
    /**
     * Dispatches a typed event to all registered listeners.
     * @override
     */
    dispatchEvent<T extends FromMetaBoxApiEvents>(messageType: T, data: FromMetaboxMessagePayloads[T]): this;
    /**
     * Removes a previously registered event listener.
     * @override
     */
    removeEventListener<T extends FromMetaBoxApiEvents>(messageType: T, callback: (data: FromMetaboxMessagePayloads[T]) => void): this;
    /**
     * Filters and dispatches incoming messages from to the Metabox.
     * @param messageType - Expected message type for filtering (MetaboxData).
     * @param event - The postMessage event received on a window.
     */
    private handleMessageReceived;
}

/**
 * Integrates the Metabox Modular Configurator into the page by injecting an iframe and
 * initializing a Communicator instance for host-to-iframe messaging.
 *
 * @remarks
 * - Builds a secure iframe URL using the provided configuratorId and config options.
 * - Ensures the resulting URL uses HTTPS and that the target container exists.
 * - Removes any previously embedded iframe with id "embeddedContent" before inserting a new one.
 *
 * @param {string} configuratorId - The Modular Configurator ID (not a full URL). It is appended to
 * `https://{domain}/metabox-configurator/modular/{configuratorId}` to form the iframe src.
 *
 * @param {string} [containerId='embed3DSource'] - The id of the container element where the iframe will be injected.
 *
 * @param {(api: Communicator) => void} apiReadyCallback - Called when the Communicator instance is created on the host side.
 *
 * @param {IntegrateMetaboxConfig} config - Optional configuration used to build the iframe URL and initialize the communicator.
 * Supported fields:
 *  - standalone?: boolean — if true, disables Metabox custom template and related logic.
 *  - introImage?: string — URL to an image shown on the intro screen (added as ?introImage=...).
 *  - introVideo?: string — URL to a video shown on the intro screen (added as ?introVideo=...).
 *  - loadingImage?: string — URL to an image displayed while loading (added as ?loadingImage=...).
 *  - state?: string — Predefined state for configurator for initial loading (added as ?state=...).
 *  - domain?: string — custom domain for testing (defaults to metabox.3dsource.com). HTTPS is enforced.
 *
 * @throws Error If configuratorId or containerId are empty strings.
 * @throws Error If the computed iframe URL is invalid or does not use HTTPS.
 * @throws Error If the container element with the provided id cannot be found.
 *
 * @example
 * import { integrateMetabox } from '@3dsource/metabox-modular-configurator-api';
 *
 * integrateMetabox(
 *   'configurator-id',
 *   'embed3DSource',
 *   (api) => {
 *     // Communicator is ready to use
 *   },
 *   {
 *     standalone: false,
 *     introImage: 'https://example.com/intro.png',
 *     loadingImage: 'https://example.com/loading.png',
 *   },
 * );
 */
declare function integrateMetabox(configuratorId: string, containerId: string | undefined, apiReadyCallback: (api: Communicator) => void, config?: IntegrateMetaboxConfig): void;

/**
 * Saves an image by triggering a download.
 *
 * @remarks
 * This function creates an anchor element, sets its `href` attribute to the provided image URL,
 * and triggers a click event to initiate a download with the specified filename.
 *
 * @param {string} imageUrl - The URL of the image to save.
 * @param {string} filename - The name of the file to save.
 */
declare function saveImage(imageUrl: string, filename: string): void;

declare const prepareIframeSrc: (configuratorId: string, config?: IntegrateMetaboxConfig) => string;

/**
 * Wrapper helper function to use it with rxJs the same as `fromEvent` to listen to events from the Communicator.
 * @param {Communicator} target
 * @param eventName
 */
declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: Communicator, eventName: T): Observable<FromMetaboxMessagePayloads[T]>;

/**
 * Represents a command to get a Call To Action Information from Metabox Modular Configurator.
 * @remarks
 * This class sends a message to the Metabox API to generate Call To Action information based on the current configuration and sends it to the endpoint url from the cta information.
 * This action does not require any parameters.
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * import { GetCallToActionInformation, Communicator } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *     api.sendCommandToMetabox(new GetCallToActionInformation());
 * };
 */
declare class GetCallToActionInformation extends CommandBase {
    /**
     * Creates an instance of GetCallToActionInformation.
     *
     * @remarks
     * This constructor does not require any parameters.
     */
    constructor();
}

/**
 * Represents a command to get a PDF from Metabox.
 * @remarks
 * This class sends a message to the Metabox API to generate a PDF based on the current configuration.
 * This action does not require any parameters.
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * import { GetPdf, Communicator } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *     api.sendCommandToMetabox(new GetPdf());
 * };
 */
declare class GetPdf extends CommandBase {
    /**
     * Creates an instance of GetPdf.
     *
     * @remarks
     * This constructor does not require any parameters.
     */
    constructor();
}

/**
 * Represents a command to send to unreal and reset camera to initial.
 * @remarks
 * This class sends a message to the Metabox API to reset the camera on a scene.
 * This action does not require any parameters.
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * import { ResetCamera, Communicator } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *     api.sendCommandToMetabox(new ResetCamera());
 * };
 */
declare class ResetCamera extends CommandBase {
    /**
     * Creates an instance of ResetCamera.
     *
     * @remarks
     * This constructor does not require any parameters.
     */
    constructor();
}

/**
 * Represents a command to Init Showcase for a product in a component on a scene and start a sequence for the product.
 * @remarks
 * This class sends a command to the Metabox API to init showcase if the product in a component has a sequence.
 * For check this needs to find a showcase property in the current product in a component
 * If this property exists, you can send init showcase command
 * You can send init showcase command only for root components; otherwise we will ignore this command
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * ```typescript
 * import { InitShowcase, Communicator } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *     api.sendCommandToMetabox(new InitShowcase();
 * };
 */
declare class InitShowcase extends CommandBase {
    /**
     * Creates an instance of InitShowcase.
     *
     * @remarks
     * This constructor does not require any parameters.
     */
    constructor();
}

/**
 * @internal
 * @hidden
 * Represents a command to send Unreal command.
 */
declare class UnrealCommand extends CommandBase {
    constructor(payload: object);
}

/**
 * Represents a command to Play Showcase for a product when it already init, and you call pause, for example, before it.
 * @remarks
 * This class sends a command to the Metabox API to play showcase for a product if it is already initialized and pause.
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * import { PlayShowcase, Communicator } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *     api.sendCommandToMetabox(new PlayShowcase());
 * };
 */
declare class PlayShowcase extends CommandBase {
    /**
     * Creates an instance of PlayShowcase.
     *
     * @remarks
     * This constructor does not require any parameters.
     */
    constructor();
}

/**
 * Represents a command to Pause Showcase for a product when it already init and play, and you call pause.
 * @remarks
 * This class sends a command to the Metabox API to pause showcase for a product if it is already initialized and play.
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * import { PauseShowcase, Communicator } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *     api.sendCommandToMetabox(new PauseShowcase());
 * };
 */
declare class PauseShowcase extends CommandBase {
    /**
     * Creates an instance of PauseShowcase.
     *
     * @remarks
     * This constructor does not require any parameters.
     */
    constructor();
}

/**
 * Represents a command to Stop Showcase for a product when it already init, and you want to destroy it.
 * @remarks
 * This class sends a command to the Metabox API to Stop showcase for a product if it is already initialized.
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * import { StopShowcase, Communicator } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *     api.sendCommandToMetabox(new StopShowcase());
 * };
 */
declare class StopShowcase extends CommandBase {
    /**
     * Creates an instance of StopShowcase.
     *
     * @remarks
     * This constructor does not require any parameters.
     */
    constructor();
}

/**
 * Image format.
 * @remarks
 * This type represents the allowed image formats.
 */
type MimeType = 'image/png' | 'image/jpeg' | 'image/webp';
/**
 * Represents a command to get a screenshot.
 *
 * **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
 *
 * @example
 * import { GetScreenshot, Communicator, saveImage } from '@3dsource/metabox-modular-configurator-api';
 * window.env3DSource.apiReady = (api: Communicator) => {
 *   // Listen for events from to the Metabox API
 *   api.addEventListener('screenshot', (data) => {
 *     // Process the get screenshot response
 *    saveImage(data, 'Render.png');
 *   });
 *   api.sendCommandToMetabox(new GetScreenshot('image/png', { x: 1024, y: 1024 }));
 * };
 */
declare class GetScreenshot extends CommandBase {
    /**
     * Constructs an instance of GetScreenshot.
     * @param {MimeType} mimeType - The output format.
     * @param {{ x: number; y: number }} [size] - Optional size in pixels.
     */
    constructor(mimeType: MimeType, size?: {
        x: number;
        y: number;
    });
}

/**
 * Represents a command to set a component by its data (ID, typeId, isRoot).
 *
 * @remarks
 * This action sends a message to the Metabox API to set a component using the provided component ID and its component type data.
 *
 * @example
 * import { SetComponent, Communicator } from '@3dsource/metabox-modular-configurator-api';
 *
 * //...Assume that the integration is already implemented
 * window.env3DSource.apiReady = (api: Communicator) => {
 *   api.setCommandToMetaBox(new SetComponent(
 *     'ffea6b5c-3a8a-4f56-9417-e605acb5cca3', 'typeId', true
 *   ));
 * };
 */
declare class SetComponent extends CommandBase {
    /**
     * Creates an instance of SetComponent.
     *
     * @param {string} id
     * @param {string} typeId
     * @param {boolean} isRoot
     */
    constructor(id: string, typeId: string, isRoot: boolean);
}

/**
 * Represents a command to set component material by its slot ID and Material ID.
 *
 * @example
 * import { SetComponentMaterial, Communicator } from '@3dsource/metabox-modular-configurator-api';
 *
 * //...Assume that the integration is already implemented
 * window.env3DSource.apiReady = (api: Communicator) => {
 *   api.sendCommandToMetabox(new SetComponentMaterial(
 *     'ffea6b5c-3a8a-4f56-9417-e605acb5cca3',
 *     'carpaint',
 *     'dd829d6e-9200-47a7-8d5b-af5df89b7e91',
 *   ));
 * };
 */
declare class SetComponentMaterial extends CommandBase {
    /**
     * Creates an instance of SetComponentMaterial.
     *
     * @param {string} componentId - The component ID.
     * @param {string} slotId - The slot ID.
     * @param {string} materialId - The material ID.
     */
    constructor(componentId: string, slotId: string, materialId: string);
}

/**
 * Represents a command to set the environment by its ID.
 *
 * @example
 * import { SetEnvironment, Communicator } from '@3dsource/metabox-modular-configurator-api';
 *
 * //...Assume that the integration is already implemented
 * window.env3DSource.apiReady = (api: Communicator) => {
 *   // Change the environment to '55555555-1234-1234-1234-01234567890'
 *   api.sendCommandToMetabox(new SetEnvironment('55555555-1234-1234-1234-01234567890'));
 * };
 */
declare class SetEnvironment extends CommandBase {
    /**
     * Creates an instance of SetEnvironment.
     *
     * @param {string} environmentId - The environment ID.
     */
    constructor(environmentId: string);
}

/**
 * Represents a command to set an environment material by its slot ID and Material ID.
 *
 * @example
 * import { SetEnvironmentMaterial, Communicator } from '@3dsource/metabox-modular-configurator-api';
 *
 * //...Assume that the integration is already implemented
 * window.env3DSource.apiReady = (api: Communicator) => {
 *    api.sendCommandToMetabox(new SetEnvironmentMaterial(
 *     'carpaint',
 *     'dd829d6e-9200-47a7-8d5b-af5df89b7e91',
 *    ));
 * };
 */
declare class SetEnvironmentMaterial extends CommandBase {
    /**
     * Creates an instance of SetEnvironmentMaterial.
     *
     * @param {string} slotId - The slot ID.
     * @param {string} materialId - The material ID.
     */
    constructor(slotId: string, materialId: string);
}

/**
 * Represents a command to toggle the Embedded to the Metabox Menu.
 *
 * @example
 * import { ShowEmbeddedMenu, Communicator } from '@3dsource/metabox-modular-configurator-api';
 *
 * //...Assume that the integration is already implemented
 * window.env3DSource.apiReady = (api: Communicator) => {
 *   api.setCommandToMetaBox(new ShowEmbeddedMenu(true));
 * };
 */
declare class ShowEmbeddedMenu extends CommandBase {
    /**
     * Creates an instance of ShowEmbeddedMenu.
     *
     * @param {boolean} visible - A flag indicating whether the embedded menu should be visible.
     */
    constructor(visible: boolean);
}

/**
 * Represents a command to toggle the Unreal Overlay Interface Menu.
 *
 * @remarks
 * This action sends a message to the Metabox API to toggle the visibility of the Unreal overlay UI.
 *
 * @example
 * import { ShowOverlayInterface, Communicator } from '@3dsource/metabox-modular-configurator-api';
 *
 * //...Assume that the integration is already implemented
 * window.env3DSource.apiReady = (api: Communicator) => {
 *   api.setCommandToMetaBox(new ShowOverlayInterface(true));
 * };
 */
declare class ShowOverlayInterface extends CommandBase {
    /**
     * Creates an instance of ShowOverlayInterface.
     *
     * @param {boolean} visible - A flag indicating whether the Unreal overlay UI should be visible.
     */
    constructor(visible: boolean);
}

/**
 * Represents a command to send Metabox Config to Metabox Modular Configurator.
 * @remarks
 * Automatically sent when the Communicator instance is ready.
 */
declare class MetaboxConfig extends CommandBase {
    /**
     * Creates an instance of MetaboxConfig.
     * @param {string} appId - The unique identifier for the Communicator Instance
     * @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
     */
    constructor(appId: string, config: MetaboxCommandConfig);
}

export { AppLoaded, ApplyZoom, BasicRouteUrl, CommandBase, Communicator, EventDispatcher, GetCallToActionInformation, GetPdf, GetScreenshot, InitShowcase, Metabox, MetaboxConfig, MetaboxData, MetaboxDomain, MetaboxHost, MetaboxModularConfiguratorActions, PauseShowcase, PlayShowcase, ResetCamera, SetComponent, SetComponentMaterial, SetEnvironment, SetEnvironmentMaterial, ShowEmbeddedMenu, ShowOverlayInterface, StopShowcase, UnrealCommand, VERSION, fromCommunicatorEvent, integrateMetabox, prepareIframeSrc, saveImage };
export type { ApplicationDeviceTypes, ComponentWithParent, Cta, EcomConfigurator, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxApiAction, FromMetaboxMessagePayloads, InitialModularConfigurator, IntegrateMetaboxConfig, Listener, MCAppLoaded, Material, MetaBoxApiEnvelope, MetaProperty, MetaboxCommandConfig, MetaboxEnvironment, MimeType, ModularConfiguratorComponent, ModularConfiguratorComponentType, ModularConfiguratorConnector, ModularConfiguratorEnvelope, ModularConfiguratorEnvironment, ModularConfiguratorVirtualSocketToConnector, Product, SelectedIds, ShowCaseStatus, Showcase, Slot, Test, Thumbnail, Timecode, ToMetaBoxActions, ToMetaBoxMessage, ToMetaBoxMessageEnvelope, ToMetaboxMessagePayload, ToMetaboxMessagePayloads, VideoResolution };
