import React, { type FC } from 'react';
import { type ActivationEvent, type Plugin, PluginManager } from '../../core';
import { ErrorBoundary } from '../components/ErrorBoundary';
export type UseAppOptions = {
    pluginManager?: PluginManager.PluginManager;
    pluginLoader?: PluginManager.ManagerOptions['pluginLoader'];
    plugins?: Plugin.Plugin[];
    core?: string[];
    defaults?: string[];
    /**
     * Additional activation events to fire before startup.
     * These are fired alongside SetupReactSurface before the Startup event.
     */
    setupEvents?: ActivationEvent.ActivationEvent[];
    placeholder?: FC<{
        stage: number;
    }>;
    fallback?: ErrorBoundary['props']['fallback'];
    cacheEnabled?: boolean;
    safeMode?: boolean;
    debounce?: number;
    timeout?: number;
};
/**
 * Expected usage is for this to be the entrypoint of the application.
 * Initializes plugins and renders the root components.
 *
 * @example
 * const plugins = [LayoutPlugin(), MyPlugin()];
 * const core = [LayoutPluginId];
 * const default = [MyPluginId];
 * const fallback = <div>Initializing Plugins...</div>;
 * const App = useApp({ plugins, core, default, fallback });
 * createRoot(document.getElementById('root')!).render(
 *   <StrictMode>
 *     <App />
 *   </StrictMode>,
 * );
 *
 * @param params.pluginLoader A function which loads new plugins.
 * @param params.plugins All plugins available to the application.
 * @param params.core Core plugins which will always be enabled.
 * @param params.defaults Default plugins are enabled by default but can be disabled by the user.
 * @param params.placeholder Placeholder component to render during startup.
 * @param params.fallback Fallback component to render if an error occurs during startup.
 * @param params.cacheEnabled Whether to cache enabled plugins in localStorage.
 * @param params.safeMode Whether to enable safe mode, which disables optional plugins.
 */
export declare const useApp: ({ pluginManager, pluginLoader: pluginLoaderProp, plugins: pluginsProp, core: coreProp, defaults: defaultsProp, setupEvents: setupEventsProp, placeholder, fallback, cacheEnabled, safeMode, debounce, timeout, }: UseAppOptions) => () => React.JSX.Element;
//# sourceMappingURL=useApp.d.ts.map