import { TypeTreeEventState } from '@ldesign/utils/es/tree/types';
import TreeNode from '@ldesign/utils/es/tree/tree-node';
import { CheckboxProps } from '../checkbox';
import { LNode, TreeOptionData } from '../../common.type';
export interface TypeTreeProps<T extends TreeOptionData = TreeOptionData> {
    activable?: boolean;
    actived?: Array<TreeNodeValue>;
    defaultActived?: Array<TreeNodeValue>;
    activeMultiple?: boolean;
    checkable?: boolean;
    checkProps?: CheckboxProps;
    checkStrictly?: boolean;
    data?: Array<T>;
    disableCheck?: boolean | ((node: TreeNodeModel) => boolean);
    disabled?: boolean;
    empty?: string | LNode;
    expandAll?: boolean;
    expanded?: Array<TreeNodeValue>;
    defaultExpanded?: Array<TreeNodeValue>;
    expandLevel?: number;
    expandMutex?: boolean;
    expandOnClickNode?: boolean;
    expandParent?: boolean;
    filter?: (node: TreeNodeModel<T>) => boolean;
    hover?: boolean;
    icon?: boolean | LNode<TreeNodeModel>;
    keys?: TreeKeysType;
    label?: string | boolean | LNode<TreeNodeModel<T>>;
    lazy?: boolean;
    line?: boolean | LNode;
    load?: (node: TreeNodeModel<T>) => Promise<Array<T>>;
    operations?: LNode<TreeNodeModel<T>>;
    transition?: boolean;
    value?: Array<TreeNodeValue>;
    defaultValue?: Array<TreeNodeValue>;
    valueMode?: 'onlyLeaf' | 'parentFirst' | 'all';
    onActive?: (value: Array<TreeNodeValue>, context: {
        node: TreeNodeModel<T>;
    }) => void;
    onChange?: (value: Array<TreeNodeValue>, context: {
        node: TreeNodeModel<T>;
    }) => void;
    onClick?: (context: {
        node: TreeNodeModel<T>;
        e: MouseEvent;
    }) => void;
    onExpand?: (value: Array<TreeNodeValue>, context: {
        node: TreeNodeModel<T>;
        e: MouseEvent;
    }) => void;
    onLoad?: (context: {
        node: TreeNodeModel<T>;
    }) => void;
}
export interface TreeInstanceFunctions<T extends TreeOptionData = TreeOptionData> {
    appendTo?: (value: TreeNodeValue, newData: T | Array<T>) => void;
    getIndex?: (value: TreeNodeValue) => number;
    getItem?: (value: TreeNodeValue) => TreeNodeModel<T>;
    getItems?: (value?: TreeNodeValue) => Array<TreeNodeModel<T>>;
    getParent?: (value: TreeNodeValue) => TreeNodeModel<T>;
    getParents?: (value: TreeNodeValue) => TreeNodeModel<T>[];
    getPath?: (value: TreeNodeValue) => TreeNodeModel<T>[];
    insertAfter?: (value: TreeNodeValue, newData: T) => void;
    insertBefore?: (value: TreeNodeValue, newData: T) => void;
    remove?: (value: TreeNodeValue) => void;
    setItem?: (value: TreeNodeValue, options: TreeNodeState) => void;
}
export interface TreeNodeState {
    activable?: boolean;
    actived?: boolean;
    checkable?: boolean;
    checked?: boolean;
    disabled?: boolean;
    expanded?: boolean;
    expandMutex?: boolean;
    indeterminate?: boolean;
    label?: string;
    loading?: boolean;
    value?: string | number;
    visible?: boolean;
}
export interface TreeNodeModel<T extends TreeOptionData = TreeOptionData> extends TreeNodeState {
    actived: boolean;
    checked: boolean;
    data: T;
    expanded: boolean;
    indeterminate: boolean;
    loading: boolean;
    appendData: (data: T | Array<T>) => void;
    getChildren: (deep: boolean) => Array<TreeNodeModel> | boolean;
    getIndex: () => number;
    getLevel: () => number;
    getParent: () => TreeNodeModel;
    getParents: () => Array<TreeNodeModel>;
    getPath: () => Array<TreeNodeModel>;
    getRoot: () => TreeNodeModel;
    getSiblings: () => Array<TreeNodeModel>;
    insertAfter: (newData: T) => void;
    insertBefore: (newData: T) => void;
    isFirst: () => boolean;
    isLast: () => boolean;
    isLeaf: () => boolean;
    remove: (value?: TreeNodeValue) => void;
    setData: (data: T) => void;
}
export interface TreeKeysType {
    value?: string;
    label?: string;
    children?: string;
}
export declare type TreeNodeValue = string | number;
export declare type TreeProps = TypeTreeProps;
export declare type TypeLdTreeProps = TypeTreeProps;
export declare type TypeValueMode = TypeTreeProps['valueMode'];
export declare type TypeLNodeProp = string | LNode<TypeTreeNodeModel>;
export declare type TypeTreeNodeModel = TreeNodeModel<TreeOptionData>;
export declare type TypeTargetNode = TreeNodeValue | TreeNode | TypeTreeNodeModel;
export interface TypeEventState extends TypeTreeEventState {
    mouseEvent?: MouseEvent;
    event?: Event;
    path?: TreeNode[];
}
export interface TypeMark {
    name: string;
    value: string;
    el?: HTMLElement;
}
export interface TypeLineModel {
    top: boolean;
    right: boolean;
    bottom: boolean;
    left: boolean;
}
export interface TypeTreeInstance extends Vue, TreeInstanceFunctions {
}
export interface TypeGetTNodeOption {
    node?: TreeNode;
    createElement?: Vue.CreateElement;
}
