import React, { type FC } from 'react';
import { PluginManager, type PluginManagerOptions, type Plugin } from './core';
import { ErrorBoundary } from './react';
export type CreateAppOptions = {
pluginManager?: PluginManager;
pluginLoader?: PluginManagerOptions['pluginLoader'];
plugins?: Plugin[];
core?: string[];
defaults?: string[];
placeholder?: FC<{
stage: number;
}>;
fallback?: ErrorBoundary['props']['fallback'];
cacheEnabled?: boolean;
safeMode?: boolean;
};
/**
* 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 =
Initializing Plugins...
;
* const App = createApp({ plugins, core, default, fallback });
* createRoot(document.getElementById('root')!).render(
*
*
* ,
* );
*
* @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: _pluginLoader, plugins: _plugins, core: _core, defaults: _defaults, placeholder, fallback, cacheEnabled, safeMode, }: CreateAppOptions) => () => React.JSX.Element;
//# sourceMappingURL=App.d.ts.map