import { type HTMLAttributes } from 'react';
import { type VariantProps } from 'class-variance-authority';
import { entitySurfaceVariants } from '../_shared/entity-card';
/** A planned (not-yet-executed) appointment the line is scheduled into. */
export interface CarePlanEntryPlannedAppointment {
/** ISO-8601 date / datetime string. */
dateIso: string;
/** Stable appointment id (identifier only — never PHI). */
appointmentId: string;
/** Optional deep link to the appointment. */
url?: string;
}
/** Price breakdown for the line, all amounts in integer cents. */
export interface CarePlanEntryPrice {
/** List price in cents (non-negative). */
priceCents?: number;
/** Discounted price in cents (non-negative), when a discount applies. */
discountedPriceCents?: number;
/** Discount percentage (0–100), for the discount label. */
discountPercentage?: number;
}
/** One row of the per-phase execution breakdown. */
export interface CarePlanEntryPhaseDetail {
/** Short localised phase label (consumer-localised). */
label: string;
/** Whether this phase has been executed. */
executed: boolean;
/** ISO-8601 execution date, when executed. */
executionDateIso?: string;
/** Operator display name for the phase. */
operator?: string;
/** Unique Device Identifier / lot string for traceable materials. */
udi?: string;
}
/** Phase progress summary + optional drill-down detail. */
export interface CarePlanEntryPhases {
/** Number of executed phases. */
executed: number;
/** Total number of phases. */
total: number;
/** Optional per-phase breakdown rendered inside the Collapsible. */
detail?: CarePlanEntryPhaseDetail[];
}
/** Operator the line is assigned to. */
export interface CarePlanEntryOperator {
/** Operator display name (consumer-localised). */
name: string;
}
/** Curated read-only handle exposed to the agent registry. */
export interface CarePlanEntryCardHandle {
/** Whether the line is marked executed. */
isDone: () => boolean;
/** Phase progress as `{ executed, total }` — counts only, no PHI. */
getPhaseProgress: () => {
executed: number;
total: number;
};
}
export interface CarePlanEntryCardProps extends Omit, 'aria-label' | 'title' | 'children'> {
/**
* Stable instance id — surfaced as `data-component-id` for the agent
* registry and used to wire up the heading ↔ region relationship.
*/
id?: string;
/** Treatment / service name. Rendered as the line heading. */
careName: string;
/** Optional treatment code (e.g. tariff code) shown beside the name. */
code?: string;
/** Optional secondary label (e.g. category) under the name. */
label?: string;
/** FDI tooth codes the line applies to (e.g. `['16', '36']`). */
elements?: string[];
/** Whether the line has been executed / completed. */
done?: boolean;
/** ISO-8601 execution date — rendered next to the "done" badge. */
executionDateIso?: string;
/** A planned appointment the line is scheduled into, when not yet done. */
plannedAppointment?: CarePlanEntryPlannedAppointment;
/** Operator the line is assigned to. */
operator?: CarePlanEntryOperator;
/** Price breakdown (list / discounted). */
price?: CarePlanEntryPrice;
/** Phase progress + optional drill-down detail. */
phases?: CarePlanEntryPhases;
/** Whether the line has been billed / invoiced. */
billed?: boolean;
/** Whether the line falls outside the accepted estimate. */
outsideOfEstimate?: boolean;
/** Count of attached notes — rendered as a neutral count badge when > 0. */
notesCount?: number;
/**
* How to render `elements`: `'chips'` (default) lists each FDI code as a
* Tag; `'scheme'` renders a read-only `ToothScheme` highlighting them.
*/
toothDisplay?: 'scheme' | 'chips';
/** BCP 47 locale override for dates / currency. Defaults to i18n.language. */
locale?: string;
/** ISO 4217 currency code for the price chip. Defaults to `EUR`. */
currency?: string;
/**
* `elevated` (default) paints the kit card chrome; `flat` drops it for use
* inside an existing Card / Sheet.
*/
surface?: 'flat' | 'elevated';
/** Accessible label override for the line region. */
'aria-label'?: string;
}
export declare const CarePlanEntryCard: import("react").ForwardRefExoticComponent>;
export type CarePlanEntryCardSurface = NonNullable['surface']>;
//# sourceMappingURL=care-plan-entry-card.d.ts.map