import { KeygenResult, ObjectType, KeygenType, UnMatchedValue } from '../@types/common';
export declare const CheckedMode: {
    Full: number;
    Half: number;
    Child: number;
    Shallow: number;
    Freedom: number;
};
declare type CheckedStatus = 0 | 1 | 2;
export declare type TreeModeType = 0 | 1 | 2 | 3 | 4;
export interface TreePathType {
    children: KeygenResult[];
    path: (number | string)[];
    isDisabled: boolean;
    indexPath: number[];
    index: number;
}
declare type Value = KeygenResult[];
export interface TreeDatumOptions<Item> {
    data?: Item[];
    keygen?: KeygenType<Item> | ((data: Item, parentKey: KeygenResult) => KeygenResult);
    value?: Value;
    /**
     * @en mode 0: Returns only the fully selected node including the parent node. 1: Returns all selected nodes and semi-selected nodes. 2: Return only the selected child nodes. 3: If the parent node is full selected, only return the parent node. 4: What you choose is what you get.
     * @cn 选中值模式，未设置值为单选 0: 只返回完全选中的节点，包含父节点 1: 返回全部选中的节点和半选中的父节点 2: 只返回选中的子节点 3: 如果父节点选中，只返回父节点 4: 所选即所得
     */
    mode?: TreeModeType;
    disabled?: ((data: Item, ...rest: any) => boolean) | boolean;
    childrenKey: string;
    unmatch?: boolean;
    loader?: (key: KeygenResult, data: Item) => void;
    onChange?: (value: any, ...rest: any) => void;
}
export default class<Item> {
    keygen?: TreeDatumOptions<Item>['keygen'];
    mode: TreeDatumOptions<Item>['mode'];
    unmatch: TreeDatumOptions<Item>['unmatch'];
    disabled?: ((data: Item, ...rest: any) => boolean);
    childrenKey: TreeDatumOptions<Item>['childrenKey'];
    valueMap: Map<KeygenResult, CheckedStatus>;
    unmatchedValueMap: Map<any, any>;
    events: Map<KeygenResult, Function>;
    $events: ObjectType<Function[]>;
    value?: Value;
    data?: Item[];
    cachedValue?: unknown[];
    pathMap: Map<KeygenResult, TreePathType>;
    dataMap: Map<KeygenResult, Item>;
    constructor(options?: TreeDatumOptions<Item>);
    updateDisabled(dis: TreeDatumOptions<Item>['disabled']): void;
    bind(id: number | string, update: Function): void;
    unbind(id: KeygenResult): void;
    setUnmatedValue(): void;
    isUnMatch(data: ObjectType | null): data is UnMatchedValue;
    setValue(value?: Value): void;
    getValue(): Value;
    setValueMap(id: KeygenResult, checked: CheckedStatus): void;
    set(id: KeygenResult, checked: CheckedStatus, direction?: 'asc' | 'desc'): CheckedStatus | null;
    isDisabled(id: KeygenResult): boolean;
    get(id: KeygenResult): CheckedStatus | undefined;
    getDataById(id: KeygenResult): Item | {
        IS_NOT_MATCHED_VALUE: boolean;
        value: KeygenResult;
    } | null;
    getPath(id: KeygenResult): TreePathType | undefined;
    getChecked(id: KeygenResult): boolean | "indeterminate";
    getKey(data: Item, id?: KeygenResult, index?: number): KeygenResult;
    initValue(ids?: KeygenResult[], forceCheck?: boolean): CheckedStatus | undefined;
    initData(data: Item[], path: KeygenResult[], disabled?: boolean, index?: number[]): KeygenResult[];
    setData(data?: Item[], dispatch?: boolean): void;
    subscribe(name: string, fn: Function): void;
    unsubscribe(name: string, fn: Function): void;
    dispatch(name: string, ...args: any): void;
}
export {};
