import { storage } from "../library";
import { startApp } from "./startup/startApp";
import { getAppInstanceManager } from "./startup/AppInstance";
/**
 * 启动框架
 * 
 * @param options - 启动配置选项
 * @returns Promise<void>
 * 
 * @example
 * ```typescript
 * import { start } from '@vlian/framework';
 * 
 * start({
 *   loggerLevel: LogLevel.DEBUG,
 *   lifecycle: {
 *     beforeInitialization: async () => {
 *       console.log('初始化前执行');
 *     },
 *   },
 * });
 * ```
 */ /**
 * 启动框架（向后兼容的API）
 * 
 * @param options - 启动配置选项
 * @returns Promise<void>
 * 
 * @deprecated 建议使用 startApp 函数，支持多实例
 */ const start = async (options = {})=>{
    // 使用新的启动函数，保持向后兼容
    await startApp(options);
};
// 导出新的启动函数
export { startApp } from "./startup/startApp";
export { getAppInstanceManager } from "./startup/AppInstance";
// 导出向后兼容的start函数
export { start, storage };
// 导出getStateManager（向后兼容）
export const getStateManager = ()=>{
    const instanceManager = getAppInstanceManager();
    const instance = instanceManager.getInstance();
    if (instance) {
        return instance.getServices().stateManager;
    }
    return null;
};
// 导出应用上下文相关功能
export { AppContextProvider, useAppContext, useTheme, useLocale, useConfig, useStateManager } from "./app";
// 导出错误边界
export { ErrorBoundary, withErrorBoundary, useErrorHandler } from "./error";
// 导出应用配置单例
export { appConfig } from "./config/AppConfig";
// 导出中间件
export { MiddlewareManager, middlewareManager } from "./middleware";
// 导出插件
export { PluginManager, pluginManager } from "./plugin";
// 导出启动相关模块
export * from "./startup";
export * from "./config";
// 导出路由相关模块
export * from "./router";
// 导出事件系统
export * from "./event";
// 导出开发工具
export { DevTools, DevToolsTrigger } from "./dev/DevTools";

//# sourceMappingURL=index.js.map