import type { ComponentPublicInstance } from 'vue'; import type { Numeric } from 'xzx-design/es/utils'; import type { SelectProps } from './select'; export type SelectToolbarPosition = 'top' | 'bottom'; export type SelectFieldNames = { text?: string; value?: string; children?: string; }; export type SelectOption = { text?: Numeric; value?: Numeric; disabled?: boolean; children?: SelectColumn; className?: unknown; [key: PropertyKey]: any; }; export type SelectColumn = SelectOption[]; export type SelectExpose = { confirm: () => void; getSelectedOptions: () => Array; }; export type SelectColumnProvide = { state: { index: number; offset: number; duration: number; options: SelectOption[]; }; setIndex: (index: number, emitChange?: boolean | undefined) => void; getValue: () => SelectOption; setValue: (value: string) => void; setOptions: (options: SelectOption[]) => void; stopMomentum: () => void; }; export type SelectInstance = ComponentPublicInstance; export type SelectConfirmEventParams = { selectedValues: Numeric[]; selectedOptions: Array; selectedIndexes: number[]; }; export type SelectCancelEventParams = SelectConfirmEventParams; export type SelectChangeEventParams = SelectConfirmEventParams & { columnIndex: number; }; export type SelectThemeVars = { selectBackground?: string; selectToolbarHeight?: string; selectTitleFontSize?: string; selectTitleLineHeight?: number | string; selectActionPadding?: string; selectActionFontSize?: string; selectConfirmActionColor?: string; selectCancelActionColor?: string; selectOptionFontSize?: string; selectOptionPadding?: string; selectOptionTextColor?: string; selectOptionDisabledOpacity?: number | string; selectLoadingIconColor?: string; selectLoadingMaskColor?: string; selectMaskColor?: string; }; export type SelectGroupThemeVars = { selectGroupBackground?: string; };