/**
 * 模块解析器
 *
 * @author Ezios
 * @date 5:26 下午
 * @description
 *
 */
import type { CustomComponentMetaSchema, PartialComponentMetaSchema, PackageSchema, ComponentMetaSchemaForRenderer, SetterComponent } from '@mo-fang/types';
import { ComponentType } from 'react';
import type { CustomComponentEvent } from '../types';
import { Module } from './system';
export declare class DependencyManager {
    /**
     * 组件元数据
     */
    componentsMetaMapper: Map<string, ComponentMetaSchemaForRenderer | CustomComponentMetaSchema>;
    /**
     * 资产包元数据
     */
    packagesMeta: PackageSchema[];
    /**
     * 已加载的资产包集合
     */
    packages: Map<string, Module>;
    /**
     * 组件集合
     */
    components: Map<string, ComponentType<any>>;
    /**
     * 自定义组件池
     */
    customMetaCache: Map<string, PartialComponentMetaSchema>;
    /**
     * 依赖载入 Promise
     */
    resolver?: Promise<void>;
    events: {
        onCustomComponentMount?: (event: CustomComponentEvent) => void;
        onLoaded?: () => void;
    };
    constructor(events: DependencyManager['events']);
    /**
     * 准备资源
     *
     * @param componentsMeta
     * @param packagesMeta
     * @param components
     */
    prepare(componentsMeta: ComponentMetaSchemaForRenderer[], packagesMeta?: PackageSchema[], components?: Record<string, ComponentType<any>>): void;
    /**
     * 初始化依赖
     */
    initDependencies: (packagesMeta: PackageSchema[]) => Promise<any[]>;
    /**
     * 生成组件集
     */
    generateComponents: () => void;
    /**
     * 组件获取器
     *
     * @param componentName
     */
    componentGetter: (componentName: string) => ComponentType;
    /**
     * 获取组件元数据
     *
     * @param componentName 获取组件meta信息
     * @returns AssetMeta
     */
    componentMetaGetter: (componentName: string) => ComponentMetaSchemaForRenderer | CustomComponentMetaSchema | undefined;
    /**
     * 通过元数据查找组件
     *
     * @param meta
     * @param componentName
     */
    findComponentWithMeta: (meta: ComponentMetaSchemaForRenderer | CustomComponentMetaSchema, componentName: string) => ComponentType | undefined;
    /**
     * 获取包
     *
     * @param packageName
     */
    getPackage: (packageName: string) => any;
    /**
     * 应用缓存中已有的 meta
     */
    applyMetaFromCache: () => void;
    /**
     * 触发自定义组件事件
     */
    emitCustomComponentMount: (meta: PartialComponentMetaSchema) => void;
    /**
     * 注册组件
     *
     * @param meta
     * @param component
     */
    registerComponent: (meta: PartialComponentMetaSchema, component?: SetterComponent['component']) => void;
}
//# sourceMappingURL=dependency-manager.d.ts.map