import { Component, Options } from "../interface/component";
import { DTModel, DTModelGroup } from "../interface/model";
export declare function count(options: Options[]): number;
/**
 * 根据类型查询
 * @param component
 * @param type
 * @returns
 */
export declare const search: <M extends DTModel>(component: Component<M>, type: string, shallow: boolean) => Component<M>[];
/**
 * 根据ID查询
 * @param component
 * @param id
 * @returns
 */
export declare const get: <M extends DTModel>(component: Component<M>, id: string, shallow: boolean) => Component<M>;
/**
 * 根据自定义处理器查询
 * @param component
 * @param callback
 * @returns
 */
export declare const filter: <M extends DTModel>(component: Component<M>, callback: (component: Component<M>) => boolean, shallow: boolean) => Component<M>[];
/**
 * 添加子组件
 * @param component
 * @param child
 */
export declare const add: <M extends DTModel>(component: Component<M>, child: Component<M>, attach?: boolean) => Promise<void>;
/**
 * 替换
 * @param component
 * @param target
 */
export declare const replace: <M extends DTModel>(component: Component<M>, target: Component<M>) => void;
/**
 * 删除子组件
 * @param component
 * @param child
 */
export declare const remove: <M extends DTModel>(component: Component<M>, child: Component<M>) => Promise<void>;
/**
 * 从父组件中移除
 */
export declare const removeFromParent: <M extends DTModel>(component: Component<M>) => Promise<void>;
/**
 * 销毁
 * @param component
 */
export declare const dispose: <M extends DTModel>(component: Component<M>) => Promise<void>;
/**
 * 清空
 */
export declare const clear: <M extends DTModel>(component: Component<M>) => Promise<void>;
/**
 * 创建组件的构造器
 * @param process
 * @param createModel
 * @returns
 */
export default function createComponentCreator<M extends DTModel>(modelMapping: Map<string, M>, createModelGrop: (model: M[]) => DTModelGroup<M>): (options: Options, parent?: Component<M>) => Promise<Component<M>>;
