import type { ReactNode } from "react"; import { type ActionType } from "../ActionCard/ActionIcon"; import { type Props as InstrumentCardProps } from "../InstrumentCard/InstrumentCard"; /** * `Omit` distributes over the union so `InstrumentCard`'s discriminated * `state`/`errorMessage` pairing survives; a plain `Omit` would collapse it. */ type DistributiveOmit = T extends unknown ? Omit : never; /** One line of the schedule section, e.g. "Starts: 4 day(s) before Patient Activated". */ export type ScheduleRow = { /** * Leading 24x24 icon, e.g. ``. Decorative — the component hides * it from assistive tech, so the label and value carry the meaning. */ icon: ReactNode; /** Light-weight prefix, e.g. `"Starts:"`. */ label: string; /** Regular-weight value shown alongside the label on the same line. */ value: string; /** Optional smaller line beneath, e.g. `"From 12:00 - 13:00"`. */ detail?: string; }; export type Props = { /** Selects the coloured action icon shown beside the title. */ type: ActionType; /** * Replaces the icon on **measurement** actions only; ignored for the other * four types, whose icons are fixed. */ iconUrl?: string | null; /** Action name, rendered as the panel heading. */ title: string; /** Subtitle beneath the title, e.g. `"Action category"`. Omitted when absent. */ category?: string; /** Tags beneath the header, e.g. `["2 min reading time", "78% progress"]`. */ metadata?: string[]; /** * Rows of the schedule section. The whole section — heading included — is * omitted when this is absent or empty. */ schedule?: ScheduleRow[]; /** @default "Schedule settings" */ scheduleHeading?: string; /** * Instruments belonging to the action. The whole section — heading included * — is omitted when this is absent or empty. Always rendered in the detailed * variant, so `variant` is not accepted. */ instruments?: DistributiveOmit[]; /** @default "Instruments in this action" */ instrumentsHeading?: string; /** Renders the pencil button in the header. Omitted when not provided. */ onEdit?: () => void; /** Renders the trash button in the header. Omitted when not provided. */ onDelete?: () => void; /** Renders the close button in the header. Omitted when not provided. */ onClose?: () => void; /** Merged onto the root element. */ className?: string; }; /** * The expanded detail panel for a single action — the counterpart to the * `ActionCard` list row. * * Four sections stack vertically: header, metadata tags, schedule and * instruments. The schedule and instrument sections are omitted entirely when * their data is absent or empty, and each header button appears only when its * handler is provided, so the Figma variant matrix is expressed by which props * are passed rather than by a `variant` prop. * * The panel is capped at 600px wide to match the design; pass `className` to * override that if the surrounding layout needs it. * * @example * ```tsx * , label: "Starts:", value: "4 day(s) before Patient Activated" }, * { * icon: , * label: "Timeframe:", * value: "Anytime on scheduled day", * detail: "From 12:00 - 13:00", * }, * ]} * instruments={[ * { type: "info", title: "How to stop smoking", category: "Lesson", count: 2 }, * ]} * onEdit={openEditor} * onClose={closePanel} * /> * ``` */ export declare const ActionCardDetailed: ({ type, iconUrl, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, onEdit, onDelete, onClose, className, }: Props) => import("react").JSX.Element; export {};