import { type ComponentPropsWithoutRef } from 'react'; import { type VariantProps } from 'class-variance-authority'; import { type PeriodontalChartValue, type PeriodontalDentition, type PeriodontalIndices, type PeriodontalNumbering, type PeriodontalSiteId, type PeriodontalSiteState, type PeriodontalToothFinding, type PeriodontalToothState } from './periodontal-chart-data'; declare const rootVariants: (props?: ({ disabled?: boolean | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** Imperative handle — structural state + guarded edits, never PHI notes. */ export interface PeriodontalChartHandle { /** The current whole-mouth value. */ getValue: () => PeriodontalChartValue; /** The recorded state of one tooth, if any. */ getTooth: (fdi: string) => PeriodontalToothState | undefined; /** Derived whole-mouth indices (mean PD/CAL, plaque %, BoP %). */ getIndices: () => PeriodontalIndices; /** Narratable per-tooth problem list — flagged teeth only, never the note. */ getFindings: () => PeriodontalToothFinding[]; /** FDI ids of every tooth flagged missing. */ missingTeeth: () => string[]; /** Patch one probing site. */ setSite: (fdi: string, site: PeriodontalSiteId, patch: Partial) => void; /** Patch tooth-level state (mobility / missing / implant / note). */ setTooth: (fdi: string, patch: Partial) => void; /** Clear every reading from a tooth. */ clearTooth: (fdi: string) => void; /** Focus a specific measurement input. */ /** Focus one per-site input: a probing measurement or a bleeding / * plaque checkbox. An unknown tooth, site or field is ignored. */ focusSite: (fdi: string, site: PeriodontalSiteId, field: PeriodontalActiveSiteField) => void; } /** The two numeric per-site measurements. */ type NumericField = 'pocketDepthMm' | 'recessionMm'; /** The two per-site boolean flags rendered as toggles. */ type ToggleField = 'bleeding' | 'plaque'; /** A per-site field a host cursor can point at. */ export type PeriodontalActiveSiteField = NumericField | ToggleField; /** A per-tooth field a host cursor can point at. */ export type PeriodontalActiveToothField = 'mobility'; /** * One input of the chart, as a host cursor names it: a per-site field needs * its `site`; a per-tooth field (mobility) has none. The value always keys * FDI, whatever the displayed numbering. */ export type PeriodontalActiveSite = { fdi: string; site: PeriodontalSiteId; field: PeriodontalActiveSiteField; } | { fdi: string; site?: undefined; field: PeriodontalActiveToothField; }; export interface PeriodontalChartProps extends Omit, 'aria-label' | 'children' | 'onChange' | 'defaultValue'> { /** Controlled value — keyed by FDI tooth number. */ value?: PeriodontalChartValue; /** Uncontrolled initial value. */ defaultValue?: PeriodontalChartValue; /** Fired with the full next value whenever any reading changes. */ onChange?: (value: PeriodontalChartValue) => void; /** `'interactive'` (default) renders inputs; `'display'` renders read-only. */ mode?: 'interactive' | 'display'; /** Disable every input while keeping the chart interactive-styled. */ disabled?: boolean; /** Which dentition to lay out. Drives the tooth columns. */ dentition?: PeriodontalDentition; /** Tooth-number system for the column labels (value always keys FDI). */ numbering?: PeriodontalNumbering; /** Show a photoreal tooth graphic per column. Default `true`. */ showTeeth?: boolean; /** * Base URL for the photoreal tooth images, matching ToothScheme's tree — * `${assetBaseUrl}/side/{default|implant}/{top|bottom}/{fdi}.webp`. Defaults * to the kit's bundled static path. */ assetBaseUrl?: string; /** Show the decorative per-arch depth/recession curve. Default `true`. */ showCurves?: boolean; /** Show the whole-mouth index strip. Default `true`. */ showIndices?: boolean; /** Probing depth (mm) at/above which a site flags moderate. Default 4. */ moderatePocketMm?: number; /** Probing depth (mm) at/above which a site flags severe. Default 6. */ severePocketMm?: number; /** Locale for number formatting. Falls back to `i18n.language`. */ locale?: string; /** * The input a host cursor points at, e.g. the field voice control writes * next. Drawn with a dashed --ring outline (no fill) and marked `aria-current` for * assistive tech. Controlled: the chart never moves it on its own. Focus * does not move with it. Interactive mode only; absent means no highlight. */ activeSite?: PeriodontalActiveSite | null; /** * Fired when the user focuses, clicks or edits a cursor-able input (pocket * depth, recession, bleeding, plaque, mobility) by hand, so the host's * cursor can follow the mouse or keyboard, also on an input that already * had focus. Not fired for the input already active. */ onActiveSiteChange?: (site: PeriodontalActiveSite) => void; /** * Scroll the active input into view (nearest edge, both axes) each time * `activeSite` changes; never on mount. Also when a floating * VoiceControlPanel opens or grows over it, so the cursor never stays * hidden underneath. Default `false`: the chart only scrolls when asked. */ scrollActiveSiteIntoView?: boolean; /** Override the default group aria-label. */ 'aria-label'?: string; /** Agent-readiness consumer id, surfaced as `data-component-id`. */ id?: string; } export declare const PeriodontalChart: import("react").ForwardRefExoticComponent>; export type PeriodontalChartDisabled = NonNullable['disabled']>; export {}; //# sourceMappingURL=periodontal-chart.d.ts.map