import { type HTMLAttributes } from 'react';
import { type ConditionDefinition, type ConditionId, type SymbolStatus } from '../tooth-scheme/tooth-data';
/** One clinically-meaningful run of tools inside the palette. */
export interface ToothFindingPaletteGroup {
/** Stable id — emitted as `data-group` and used for the default heading key. */
id: string;
/**
* Already-translated heading. Omit for a built-in group and the palette
* resolves `toothFindingPalette.group.` instead; a custom group with no
* label and no matching key falls back to its own id.
*/
label?: string;
/** Findings in this group, in render order. */
conditions: ConditionId[];
}
/**
* Curated imperative handle. Exposed as the `forwardRef` target so a future
* agent / MCP UI bridge can arm a tool without touching the DOM — see
* `tooth-finding-palette.agent.ts`. Everything here is transient tool state;
* no patient record is reachable through it.
*/
export interface ToothFindingPaletteHandle {
/** The armed finding id, or null when the palette is disarmed. */
getValue: () => ConditionId | null;
/** Arm a finding tool (or pass null to disarm). */
setValue: (condition: ConditionId | null) => void;
/** Disarm the palette. Charted findings are untouched. */
clear: () => void;
/** The status the next charted finding takes. */
getStatus: () => SymbolStatus;
setStatus: (status: SymbolStatus) => void;
/** Every finding id the palette currently offers, in render order. */
getTools: () => ConditionId[];
/** Move the roving tab stop (and focus) to a tool without arming it. */
focusTool: (condition: ConditionId) => void;
}
export interface ToothFindingPaletteProps extends Omit, 'onChange' | 'defaultValue' | 'role' | 'color'> {
/** Controlled armed finding. `null` means "no tool armed". */
value?: ConditionId | null;
/** Initial armed finding when uncontrolled. */
defaultValue?: ConditionId | null;
/** Fires on every arm / disarm, including the toggle-off to `null`. */
onChange?: (condition: ConditionId | null) => void;
/**
* Which tools to show. Ignored when `groups` is supplied (order the groups
* instead). Omit both and the palette ships the default grouping of all
* built-in findings.
*/
conditions?: ConditionId[];
/** Explicit grouping. Wins over `conditions`. */
groups?: ToothFindingPaletteGroup[];
/**
* Practice-defined findings. They resolve exactly as they do on the chart
* (registry → built-in → glyph fallback) and, under the default grouping,
* any id that is not a built-in is appended as a "Practice findings" group.
*/
conditionRegistry?: ConditionDefinition[];
/** Show the planned / executed selector. Default `false`. */
showStatus?: boolean;
/** Controlled execution status. */
status?: SymbolStatus;
/** Initial execution status when uncontrolled. Default `'planned'`. */
defaultStatus?: SymbolStatus;
onStatusChange?: (status: SymbolStatus) => void;
/** Tile scale. Default `'md'`. */
size?: 'sm' | 'md' | 'lg';
/** Wide bar (`'horizontal'`, default) or sidebar rail (`'vertical'`). */
orientation?: 'horizontal' | 'vertical';
/** Root the tooth renders are served from. Matches `ToothScheme`. */
assetBaseUrl?: string;
/** Disable every tool. */
disabled?: boolean;
/** Disable individual tools (e.g. findings this practice cannot chart). */
disabledConditions?: ConditionId[];
/** Accessible name for the toolbar. Falls back to a translated default. */
ariaLabel?: string;
/** Render the group headings. Default `true`. */
showGroupLabels?: boolean;
className?: string;
}
export declare const DEFAULT_FINDING_GROUPS: ToothFindingPaletteGroup[];
/** Group id used for registry findings under the default grouping. */
export declare const CUSTOM_FINDING_GROUP_ID = "custom";
export declare const toothFindingPaletteVariants: (props?: ({
orientation?: "vertical" | "horizontal" | null | undefined;
size?: "sm" | "md" | "lg" | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
export declare const ToothFindingPalette: import("react").ForwardRefExoticComponent>;
//# sourceMappingURL=tooth-finding-palette.d.ts.map