import { CheckStrategy, TreeNode } from 'treemate'; import type { MergedTheme } from '../../_mixins'; import type { NLocale } from '../../locales'; import type { CascaderTheme } from '../styles'; import { InjectionKey, Ref } from 'vue'; export declare type ValueAtom = string | number; export declare type Value = ValueAtom | ValueAtom[]; export declare type Key = ValueAtom; export interface CascaderOption { label?: string; value?: ValueAtom; disabled?: boolean; children?: CascaderOption[]; [key: string]: unknown; } export declare type ExpandTrigger = 'hover' | 'click'; export declare type TmNode = TreeNode; export declare type Filter = (pattern: string, option: CascaderOption, path: CascaderOption[]) => boolean; export declare type OnLoad = (option: CascaderOption) => Promise; export declare type OnUpdateValue = (value: string & number & string[] & number[] & Array & (string | null) & (number | null) & (string[] | null) & (number[] | null) & (Array | null), option: null & CascaderOption & CascaderOption[] & Array, path: null & CascaderOption[] & Array) => void; export declare type OnUpdateValueImpl = (value: Value | null, option: CascaderOption | null | Array, path: Array | CascaderOption[] | null) => void; export declare type MenuModel = TmNode[][]; export interface CascaderInjection { mergedClsPrefixRef: Ref; mergedThemeRef: Ref>; mergedValueRef: Ref; checkedKeysRef: Ref; indeterminateKeysRef: Ref; hoverKeyPathRef: Ref; mergedCheckStrategyRef: Ref; multipleRef: Ref; keyboardKeyRef: Ref; hoverKeyRef: Ref; remoteRef: Ref; loadingKeySetRef: Ref>; expandTriggerRef: Ref; isMountedRef: Ref; cascadeRef: Ref; onLoadRef: Ref<((value: CascaderOption) => Promise) | undefined>; localeRef: Ref; virtualScrollRef: Ref; optionHeightRef: Ref; labelFieldRef: Ref; syncCascaderMenuPosition: () => void; syncSelectMenuPosition: () => void; updateKeyboardKey: (value: Key | null) => void; updateHoverKey: (value: Key | null) => void; addLoadingKey: (value: Key) => void; deleteLoadingKey: (value: Key) => void; doCheck: (value: Key) => void; doUncheck: (value: Key) => void; closeMenu: (returnFocus?: boolean) => void; handleSelectMenuClickOutside: (e: MouseEvent) => void; handleCascaderMenuClickOutside: (e: MouseEvent) => void; } export interface CascaderSubmenuInstance { scroll: (index: number, elSize: number) => void; } export interface CascaderMenuExposedMethods { scroll: (depth: number, index: number, elSize: number) => void; showErrorMessage: (label: string) => void; } export declare type CascaderMenuInstance = { $el: HTMLElement; } & CascaderMenuExposedMethods; export interface SelectMenuInstance { prev: () => void; next: () => void; enter: () => boolean; } export declare const cascaderInjectionKey: InjectionKey;