import type * as React from 'react'; import type { RadioGroupChangeReason } from '../radio-group/types.js'; import type { PrimitivePropsWithRef } from '../utils/primitive.js'; /** @internal Shared state distributed from {@link RadioCard} to its parts via context. */ export interface RadioCardContextValue { value: string; checked: boolean; disabled: boolean; /** Roving tabindex: only the checked card — or the first enabled one when nothing is checked — is a tab stop. */ tabStop: boolean; /** Whether the group has settled which card holds the tab stop, resolved after initial render for server-rendered unselected groups. */ tabStopResolved: boolean; required: boolean; /** The group's `readOnly`: the card keeps its tab stop and refuses the selection. */ readOnly: boolean; name: string | undefined; /** The group's `form` id, forwarded to this card's hidden radio input. */ form: string | undefined; labelId: string; descriptionId: string; /** Whether a `RadioCardLabel` is mounted, so the control only points `aria-labelledby` at an id that exists. */ hasLabel: boolean; /** Whether a `RadioCardDescription` is mounted, so the control only points `aria-describedby` at an id that exists. */ hasDescription: boolean; setHasLabel: (present: boolean) => void; setHasDescription: (present: boolean) => void; onSelect: (reason: RadioGroupChangeReason) => void; } /** Props for the {@link RadioCardRoot}, the `