/**
 * Widget Initialization, Lifecycle, and Loader Utilities
 *
 * Handles widget container creation, shadow DOM setup, mounting, lifecycle management,
 * and loader display. Consolidates all widget-related DOM manipulation and state management.
 */
import { type Root } from 'react-dom/client';
import type { MarketrixConfig } from '../types';
/**
 * Create widget container and shadow DOM
 * Returns the container element and shadow root
 * @param parentContainer - Optional parent container to mount within. If provided, shadow DOM will be created within this container.
 * @param containerId - Optional unique container ID. If not provided, a unique ID will be generated.
 */
export declare const createWidgetContainer: (parentContainer?: HTMLElement, containerId?: string) => {
    container: HTMLElement;
    shadowRoot: ShadowRoot;
    mountEl: HTMLElement;
};
/**
 * Mount widget component to the provided mount element
 * Returns the React root instance
 * @param mountEl - The mount element inside shadow DOM
 * @param config - Widget configuration
 * @param previewMode - If true, disables network operations (for integration previews)
 */
export declare const mountWidgetToContainer: (mountEl: HTMLElement, config: MarketrixConfig, previewMode?: boolean) => Root;
/**
 * Destroy widget container
 * @param container - Container to destroy
 */
export declare const destroyWidgetContainer: (container: HTMLElement) => void;
/**
 * Get current widget instance
 */
export declare const getWidgetInstance: () => Root | null;
/**
 * Set widget instance
 */
export declare const setWidgetInstance: (instance: Root | null) => void;
/**
 * Get current configuration
 */
export declare const getCurrentConfig: () => MarketrixConfig | null;
/**
 * Set current configuration
 */
export declare const setCurrentConfig: (config: MarketrixConfig | null) => void;
/**
 * Check if widget is initialized
 */
export declare const isWidgetInitialized: () => boolean;
/**
 * Clear widget instance and config
 */
export declare const clearWidgetState: () => void;
/**
 * Set programmatic initialization in progress flag
 */
export declare const setProgrammaticInitInProgress: (inProgress: boolean) => void;
/**
 * Check if programmatic initialization is in progress
 */
export declare const isProgrammaticInitInProgress: () => boolean;
/**
 * Check if a production widget is already active on this page
 * Production widgets (non-preview) should be singletons - only one per page
 */
export declare const isProductionWidgetActive: () => boolean;
/**
 * Set production widget active state
 * Call with true when initializing a production widget, false when unmounting
 */
export declare const setProductionWidgetActive: (active: boolean) => void;
/**
 * Show widget settings loader with optional message
 */
export declare const showWidgetSettingsLoader: (message?: string) => void;
/**
 * Hide widget settings loader
 */
export declare const hideWidgetSettingsLoader: () => void;
/**
 * Auto-initialize widget from script tag attributes
 * Retries if script tag not found to handle timing issues with ES module loading
 */
export declare const autoInitializeWidget: (retryCount?: number) => void;
/**
 * Register the widget initialization function and set up auto-initialization
 *
 * @param initWidget - Function to initialize the widget (passed to avoid circular dependency)
 */
export declare const registerAutoInit: (initWidget: (config: MarketrixConfig) => Promise<void>) => void;
//# sourceMappingURL=bootstrap.d.ts.map