import type { KeyboardEvent, MouseEvent, RefCallback } from "react"; import type { LiveNotificationEntry, NotificationThread } from "../core/NotificationEngineProps"; /** Density: panel rows carry 24px buttons, inbox rows 32px, phone rows 40px with 44px touch targets. */ export type NotificationRowVariant = "panel" | "inbox" | "phone"; /** The click or key press that opened a row. */ export type NotificationRowOpenEvent = MouseEvent | KeyboardEvent; /** One entry as a list row; reads labels and actions from the nearest `NotificationCenterProvider`. Render it inside a `ul`. */ export interface NotificationRowProps { /** A live entry from `useNotificationCenter().lists`; rows skip re-rendering while it is unchanged. */ item: LiveNotificationEntry; /** Defaults to "panel". */ variant?: NotificationRowVariant; /** The entry shown in the reading pane: tinted, with a rail and `aria-current` on its link. */ isSelected?: boolean; /** The bulk-selection checkbox state; only shown with `onCheckedChange`. */ isChecked?: boolean; /** Shows the selection checkbox; pass one stable function for every row. */ onCheckedChange?: (item: LiveNotificationEntry, checked: boolean) => void; /** An older entry inside an open thread: indented, with a 24px avatar. */ isThreadChild?: boolean; /** Set on a thread's lead row; while closed, its read and archive buttons cover the whole thread. */ thread?: NotificationThread; /** Whether the thread's older entries are showing. */ isThreadOpen?: boolean; /** Shows the thread toggle; pass one stable function for every row. */ onThreadToggle?: (thread: NotificationThread) => void; /** Opens the reason form for this action on mount, e.g. from a keyboard shortcut. */ initialReasonActionId?: string; /** Replaces opening through `onOpen`, e.g. to show the entry in a reading pane; modifier clicks still open a new tab. */ onOpen?: (item: LiveNotificationEntry, event: NotificationRowOpenEvent) => void; /** Callback ref to the row's link (an `a`, or a `button` without `href`), for roving focus in a list. */ linkRef?: RefCallback; }