"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get AppContextProvider () {
        return _app.AppContextProvider;
    },
    get DevTools () {
        return _DevTools.DevTools;
    },
    get DevToolsTrigger () {
        return _DevTools.DevToolsTrigger;
    },
    get ErrorBoundary () {
        return _error.ErrorBoundary;
    },
    get MiddlewareManager () {
        return _middleware.MiddlewareManager;
    },
    get PluginManager () {
        return _plugin.PluginManager;
    },
    get appConfig () {
        return _AppConfig.appConfig;
    },
    get getAppInstanceManager () {
        return _AppInstance.getAppInstanceManager;
    },
    get getStateManager () {
        return getStateManager;
    },
    get middlewareManager () {
        return _middleware.middlewareManager;
    },
    get pluginManager () {
        return _plugin.pluginManager;
    },
    get start () {
        return start;
    },
    get startApp () {
        return _startApp.startApp;
    },
    get storage () {
        return _library.storage;
    },
    get useAppContext () {
        return _app.useAppContext;
    },
    get useConfig () {
        return _app.useConfig;
    },
    get useErrorHandler () {
        return _error.useErrorHandler;
    },
    get useLocale () {
        return _app.useLocale;
    },
    get useStateManager () {
        return _app.useStateManager;
    },
    get useTheme () {
        return _app.useTheme;
    },
    get withErrorBoundary () {
        return _error.withErrorBoundary;
    }
});
const _library = require("../library");
const _startApp = require("./startup/startApp");
const _AppInstance = require("./startup/AppInstance");
const _app = require("./app");
const _error = require("./error");
const _AppConfig = require("./config/AppConfig");
const _middleware = require("./middleware");
const _plugin = require("./plugin");
_export_star(require("./startup"), exports);
_export_star(require("./config"), exports);
_export_star(require("./router"), exports);
_export_star(require("./event"), exports);
const _DevTools = require("./dev/DevTools");
function _export_star(from, to) {
    Object.keys(from).forEach(function(k) {
        if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
            Object.defineProperty(to, k, {
                enumerable: true,
                get: function() {
                    return from[k];
                }
            });
        }
    });
    return from;
}
/**
 * 启动框架
 * 
 * @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 (0, _startApp.startApp)(options);
};
const getStateManager = ()=>{
    const instanceManager = (0, _AppInstance.getAppInstanceManager)();
    const instance = instanceManager.getInstance();
    if (instance) {
        return instance.getServices().stateManager;
    }
    return null;
};

//# sourceMappingURL=index.js.map