import type { VNode } from 'vue'; export type CascadeNodeValue = string | number; export type CascadeNodePathValue = CascadeNodeValue[]; export type CascadeValue = CascadeNodeValue | CascadeNodePathValue | (CascadeNodeValue | CascadeNodePathValue)[]; export type CascadeConfig = Required; export declare enum ExpandTrigger { CLICK = "click", HOVER = "hover" } export type isDisabled = (data: CascadeOption, node: Node) => boolean; export type isLeaf = (data: CascadeOption, node: Node) => boolean; export type Resolve = (dataList?: CascadeOption[]) => void; export type LazyLoad = (node: Node, resolve: Resolve) => void; export type RenderLabel = ({ node, data }: { node: any; data: any; }) => VNode | VNode[]; export interface CascadeOption extends Record { label?: string; value?: CascadeNodeValue; children?: CascadeOption[]; disabled?: boolean; leaf?: boolean; } export interface CascadeProps { expandTrigger?: ExpandTrigger; multiple?: boolean; checkStrictly?: boolean; emitPath?: boolean; lazy?: boolean; lazyLoad?: LazyLoad; value?: string; label?: string; children?: string; disabled?: string | isDisabled; leaf?: string | isLeaf; hoverThreshold?: number; } export type Nullable = null | T; type ChildrenData = CascadeOption[] | undefined; declare class Node { readonly data: Nullable; readonly config: CascadeConfig; readonly parent?: Node | undefined; readonly root: boolean; readonly uid: number; readonly level: number; readonly value: CascadeNodeValue; readonly label: string; readonly pathNodes: Node[]; readonly pathValues: CascadeNodePathValue; readonly pathLabels: string[]; childrenData: ChildrenData; children: Node[]; text: string; loaded: boolean; checked: boolean; indeterminate: boolean; loading: boolean; constructor(data: Nullable, config: CascadeConfig, parent?: Node | undefined, root?: boolean); get isDisabled(): boolean; get isLeaf(): boolean; get valueByOption(): CascadeNodeValue | CascadeNodePathValue; get labelByOption(): string | string[]; get nodeByOption(): Nullable | Nullable[]; appendChild(childData: CascadeOption): Node; calcText(allLevels: boolean, separator: string): string; broadcast(event: string, ...args: unknown[]): void; emit(event: string, ...args: unknown[]): void; onParentCheck(checked: boolean): void; onChildCheck(): void; setCheckState(checked: boolean): void; doCheck(checked: boolean): void; } export default Node;