import * as React from 'react'; import { Simplify } from '@mui/types'; import { UseOptionRootSlotProps } from '../useOption'; import { PolymorphicProps, SlotComponentProps } from '../utils'; export interface OptionRootSlotPropsOverrides { } export interface OptionOwnProps { /** * The value of the option. */ value: OptionValue; children?: React.ReactNode; /** * If `true`, the option will be disabled. * @default false */ disabled?: boolean; className?: string; /** * The props used for each slot inside the Option. * @default {} */ slotProps?: { root?: SlotComponentProps<'li', OptionRootSlotPropsOverrides, OptionOwnerState>; }; /** * The components used for each slot inside the Option. * Either a string to use a HTML element or a component. * @default {} */ slots?: OptionSlots; /** * A text representation of the option's content. * Used for keyboard text navigation matching. */ label?: string; } export interface OptionSlots { /** * The component that renders the root. * @default 'li' */ root?: React.ElementType; } export interface OptionTypeMap { props: OptionOwnProps & AdditionalProps; defaultComponent: RootComponentType; } export type OptionProps['defaultComponent']> = PolymorphicProps, RootComponentType>; export interface OptionType { ['defaultComponent']>(props: PolymorphicProps, RootComponentType>): JSX.Element | null; propTypes?: any; displayName?: string | undefined; } export type OptionOwnerState = Simplify & { selected: boolean; highlighted: boolean; index: number; }>; export type OptionRootSlotProps = Simplify; ownerState: OptionOwnerState; }>;