import { type ComponentPropsWithoutRef, type ReactNode } from 'react'; import * as RadixRadioGroup from '@radix-ui/react-radio-group'; import { type VariantProps } from 'class-variance-authority'; /** * Closed relationship vocabulary. The kit owns the localised label for * each key (`dependentSelector.relationship.`). `'other'` is the * escape hatch for relationships the enum doesn't model. */ export type DependentRelationship = 'self' | 'son' | 'daughter' | 'child' | 'spouse' | 'parent' | 'sibling' | 'ward' | 'other'; export interface DependentSelectorPerson { /** Stable id — becomes the radio value + `data-option-id`. */ id: string; /** Display-formatted name (already formatted by the consumer). */ name: string; /** Closed relationship key — the kit owns the localised label. */ relationshipKey: DependentRelationship; /** * Explicit "minor" flag — drives the localised "Minor" badge. * Consumer-supplied, NOT derived from `age < 18` (legal age of * majority varies by market). */ isMinor?: boolean; /** Avatar image source — falls back to initials, then icon. */ avatarSrc?: string; /** Whole years, pre-computed by the consumer. Display-only. */ age?: number; /** * ISO 8601 date of birth. Used ONLY for the row title/tooltip — never * parsed for display math (timezone/locale birthday math is the * consumer's job). */ dob?: string; /** Disables this row; skipped by arrow navigation. */ disabled?: boolean; /** Shown in a Tooltip on the disabled row (like Radio.disabledReason). */ disabledReason?: string; } /** Agent-readiness curated handle for DependentSelector. */ export interface DependentSelectorHandle { getValue: () => string; setValue: (value: string) => void; } declare const rootVariants: (props?: ({ size?: "sm" | "md" | "lg" | null | undefined; tone?: "default" | "checkin" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; type RadixRootProps = ComponentPropsWithoutRef; export interface DependentSelectorProps extends Omit, VariantProps { /** Ordered roster to render as options. */ people: DependentSelectorPerson[]; /** Controlled selected person id. */ value?: string; /** Uncontrolled initial selection. Ignored when `value` is set. */ defaultValue?: string; /** Fires with the newly selected person id on user selection. */ onValueChange?: (personId: string) => void; /** Accessible group name, rendered as the ``. */ label?: string; /** Optional helper paragraph under the legend (wired via aria-describedby). */ description?: string; /** Shows N skeleton rows while the roster resolves; sets aria-busy. */ loading?: boolean; /** Validation/empty-confirmation message — role=alert + aria-invalid. */ error?: string; /** Slot shown when no selectable dependents exist (only self / empty). */ emptyState?: ReactNode; /** Forwarded to the radiogroup root as id + data-component-id. */ id?: string; } export declare const DependentSelector: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=dependent-selector.d.ts.map