import type { CSSProperties, VNodeChild } from "vue"; import type { XyControlStatus, XySemanticClassNames, XySemanticStyles, XySize } from "../core"; import type { XyIconName } from "../icon"; export type XySegmentedValue = number | string; export type XySegmentedContent = VNodeChild | (() => VNodeChild); export type XySegmentedOrientation = "horizontal" | "vertical"; export type XySegmentedShape = "default" | "round"; export interface XySegmentedOption { ariaLabel?: string; className?: string; disabled?: boolean; icon?: XyIconName | Exclude; id?: string; label?: XySegmentedContent; style?: CSSProperties; title?: string; value: XySegmentedValue; } export type XySegmentedOptionInput = XySegmentedValue | XySegmentedOption; export type XySegmentedSemanticDom = "icon" | "indicator" | "item" | "label" | "native" | "root"; export interface XySegmentedSemanticProps { block: boolean; disabled: boolean; itemCount: number; orientation: XySegmentedOrientation; readonly: boolean; shape: XySegmentedShape; size: XySize; status?: XyControlStatus; value?: XySegmentedValue; } export type XySegmentedClassNames = XySemanticClassNames; export type XySegmentedStyles = XySemanticStyles; export interface XySegmentedProps { ariaLabel?: string; block?: boolean; classNames?: XySegmentedClassNames; defaultValue?: XySegmentedValue; disabled?: boolean; modelValue?: XySegmentedValue; name?: string; options?: readonly XySegmentedOptionInput[]; orientation?: XySegmentedOrientation; readonly?: boolean; required?: boolean; shape?: XySegmentedShape; size?: XySize; status?: XyControlStatus; styles?: XySegmentedStyles; /** @deprecated Use orientation="vertical" instead. */ vertical?: boolean; } export interface XySegmentedOptionSlotProps { checked: boolean; index: number; option: XySegmentedOption; } export interface XySegmentedSlots { icon?: (props: XySegmentedOptionSlotProps) => VNodeChild; option?: (props: XySegmentedOptionSlotProps) => VNodeChild; } export interface XySegmentedExpose { focus: (value?: XySegmentedValue) => boolean; inputs: HTMLInputElement[]; updateIndicator: () => void; value: XySegmentedValue | undefined; }