import { type HTMLAttributes, type ReactNode } from 'react';
import { type VariantProps } from 'class-variance-authority';
export type TaskStatus = 'open' | 'in-progress' | 'done';
export type TaskPriority = 'low' | 'normal' | 'high';
/** Which entity the task links to. The platform `DoctorReminder` links to exactly one of these (or none). */
export type TaskLinkType = 'patient' | 'company' | 'operator';
export interface TaskItem {
/** Unique identifier for the task. */
id: string;
/** Title — single line, primary content. */
title: string;
/** Optional secondary line (e.g. "Patient A · Due today"). */
description?: string;
/**
* Localised due-date hint (e.g. "Due today" / "Tomorrow"). Rendered as a
* trailing eyebrow chip when set; consumers compute the bucket and pass
* the localised string.
*/
dueLabel?: string;
/**
* Linked-entity NAME (the patient / company / operator the task points at) —
* e.g. "Mario Rossi". When `linkType` is set the card renders it as a typed
* chip (a per-type glyph + an accessible "Patient/Company/Operator:" prefix);
* otherwise it renders as a plain eyebrow line. The consumer composes the
* name only — no prefix.
*/
linkedLabel?: string;
/** Type of the linked entity — drives the leading glyph + the accessible prefix on the linked chip. */
linkType?: TaskLinkType;
/**
* The linked name is a privacy mask. The chip shows an EyeOff glyph, then a
* visually hidden "Patient name hidden", then the mask marked aria-hidden:
* `linkedLabel`, or the kit's bullets when the host sends none. It replaces
* the "Patient:" prefix.
*/
linkedLabelMasked?: boolean;
/** Localised assignee display name (host-composed, e.g. "Dr. Alfa"). Renders an assignee chip on the meta line. */
assigneeLabel?: string;
/** Free-text note attached to the task — muted body line, clamped. */
note?: string;
/** Lifecycle state — drives the leading icon. */
status?: TaskStatus;
/** Priority — `high` colours the leading icon as `--destructive`. */
priority?: TaskPriority;
/** Optional deep link — when present the row is an anchor. */
url?: string;
}
export interface TaskCardProps extends Omit, 'onClick' | 'role' | 'title'>, VariantProps {
/** The task to render. */
item: TaskItem;
/** Visual density. `xs` is the compact rail row (Control Room); `sm`/`md` for in-page lists. */
size?: 'xs' | 'sm' | 'md';
/** Fires when the row is activated (click / Enter / Space). */
onActivate?: (item: TaskItem) => void;
/**
* Trailing per-row action toolbar (icon buttons: schedule, edit, …).
* Rendered above the stretched-link overlay so the controls stay
* clickable inside an interactive row.
*/
actions?: ReactNode;
/**
* Replaces the leading status glyph. Pass a control (the done checkbox)
* when the row can be completed in place: the glyph alone only reports
* status, and rendering both a glyph and a matching toggle elsewhere in
* the row shows the same mark twice, of which only one does anything.
* Rendered above the stretched-link overlay so it stays clickable.
*/
leading?: ReactNode;
}
declare const taskCardVariants: (props?: ({
size?: "sm" | "md" | "xs" | null | undefined;
interactive?: boolean | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
export declare function isSafeTaskUrl(url: string): boolean;
export declare const TaskCard: import("react").ForwardRefExoticComponent>;
export {};
//# sourceMappingURL=task-card.d.ts.map