import { type OptionKeys, type UseOptionKeysReturn } from '../../use'; import { type InjectionKey } from 'vue'; import { type DefaultProps } from '../config'; export interface CascaderOption { label?: string; value?: string | number; disabled?: boolean; children?: CascaderOption[]; isLeaf?: boolean; [key: PropertyKey]: any; } export interface CascaderStateNode { label: string; value: string | number; key: string | number; disabled: boolean; children?: CascaderStateNode[]; parent: CascaderStateNode | null; isLeaf: boolean; loadStatus: 'idle' | 'loading' | 'loaded'; depth: number; indeterminate: boolean; checked: boolean; selected: boolean; option: CascaderOption; } export type CascaderValue = string | number | (string | number)[] | (string | number)[][]; export interface CascaderProps { modelValue?: CascaderValue; options?: CascaderOption[]; fieldKeys?: OptionKeys; optionKeys?: OptionKeys; hintText?: string; labelRender?: (option: CascaderOption) => string; changeOnSelect?: boolean; allLevels?: boolean; multiple?: boolean; checkStrictly?: boolean; lazy?: boolean; load?: (node?: CascaderStateNode) => Promise | CascaderOption[]; } export declare const defaultCascaderProps: DefaultProps; export interface CascaderSlots { top?(props: { tabIndex: number; }): any; } export interface CascaderEmits { (e: 'update:modelValue', value: CascaderValue, selectedOptions: any[]): void; (e: 'change', value: CascaderValue, selectedOptions: any[]): void; (e: 'select', option: any, tabIndex: number): void; } export interface CascaderPanel { nodes: CascaderStateNode[]; selected: CascaderStateNode | null; } export declare function getSelectedOptionsByValue(options: CascaderOption[], value: CascaderValue, optionKeys: UseOptionKeysReturn, multiple?: boolean): CascaderOption[] | CascaderOption[][] | undefined; interface CascaderOptionsContext { set: (options: CascaderOption[]) => void; } export declare const cascaderOptionsContextKey: InjectionKey; export {};