import * as React from 'react'; import type { SemanticClassName } from "../_util/classNameUtils"; import type { SizeType } from '../config-provider/SizeContext'; interface SegmentedLabeledOptionWithoutIcon { className?: string; disabled?: boolean; key?: React.Key; label: React.ReactNode; value: T; /** * html `title` property for label */ title?: string; } interface SegmentedLabeledOptionWithIcon extends Omit, 'label'> { label?: SegmentedLabeledOptionWithoutIcon['label']; /** Set icon for Segmented item */ icon: React.ReactNode; } export type SegmentedValue = string | number; export type SegmentedRawOption = SegmentedValue; export type SegmentedLabeledOption = SegmentedLabeledOptionWithIcon | SegmentedLabeledOptionWithoutIcon; export type SegmentedOptions = (T | SegmentedLabeledOption)[]; export interface SegmentedProps extends Omit, 'onChange' | 'size' | 'className' | 'value' | 'defaultValue'> { prefixCls?: string; defaultValue?: ValueType; value?: ValueType; onChange?: (value: ValueType) => void; options: SegmentedOptions; disabled?: boolean; block?: boolean; size?: SizeType; className?: SemanticClassName<{ motionThumb?: string; option?: SegmentedOptionProps['className']; }, { disabled?: boolean; }>; } export interface SegmentedOptionProps { prefixCls: string; className?: SemanticClassName<{ content?: string; icon?: string; label?: string; }, { disabled?: boolean; checked?: boolean; }>; disabled?: boolean; block?: boolean; size?: SizeType; checked: boolean; motionEnd: boolean; label?: React.ReactNode; icon?: React.ReactNode; title?: string; value: SegmentedRawOption; onChange: (e: React.ChangeEvent, value: SegmentedRawOption) => void; } export declare function normalizeOptions(options: SegmentedOptions): SegmentedLabeledOption[]; declare const InternalSegmented: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; declare const Segmented: ((props: SegmentedProps & React.RefAttributes) => ReturnType) & Pick, "displayName">; export default Segmented;