import { type HTMLAttributes } from 'react';
import { type VariantProps } from 'class-variance-authority';
import { type MessageItem } from '../message-card/message-card';
/**
* Curated imperative handle for MessageTray. Exposed as the forwardRef
* target so a future agent / MCP UI bridge can drive the tray without
* touching the DOM. See `message-tray.agent.ts`.
*/
export interface MessageTrayHandle {
open: () => void;
close: () => void;
isOpen: () => boolean;
getItems: () => Array<{
id: string;
read: boolean;
}>;
getUnreadCount: () => number;
selectItem: (id: string) => void;
markRead: (id: string) => void;
dismiss: (id: string) => void;
/** Request the host to mark every message as read (mirrors onMarkAllRead). */
markAllRead: () => void;
/** Navigate to the full inbox (mirrors onViewAll). */
viewAll: () => void;
}
export interface MessageTrayProps extends Omit, 'onClick' | 'children' | 'role' | 'id'>, VariantProps {
/**
* Stable instance id. Surfaced on the root as `data-component-id` so
* an agent / MCP UI bridge can address this specific tray.
*/
id?: string;
/** Fires when the host should mark a single message as read (used by agent integration). */
onMarkRead?: (item: MessageItem) => void;
/** Messages rendered in the dropdown panel. */
items: MessageItem[];
/** Number of unread messages. Drives the badge count. */
unreadCount?: number;
/** Controlled open state. */
open?: boolean;
/** Fires when the open state changes. */
onOpenChange?: (open: boolean) => void;
/** Fires when the user activates an item (click or Enter/Space). */
onItemClick?: (item: MessageItem) => void;
/** Fires when the user dismisses / archives a message. */
onDismiss?: (item: MessageItem) => void;
/** Fires when the user clicks the header "Mark all as read" action. */
onMarkAllRead?: () => void;
/** When true the panel shows skeleton placeholders. */
loading?: boolean;
/**
* Advisory item count before the list scrolls. Consumers override the cap
* via the `--message-tray-max-block-size` custom property.
*/
maxVisible?: number;
/** When set renders a footer link that invokes `onViewAll`. */
viewAllLabel?: string;
/** Fires when the footer "View all" link is clicked. */
onViewAll?: () => void;
/** Panel alignment relative to the trigger. Default `'end'`. */
align?: 'start' | 'center' | 'end';
/** Side of the trigger to open on. Default `'bottom'`. */
side?: 'top' | 'bottom';
}
declare const messageTrayVariants: (props?: ({
size?: "sm" | "md" | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
export declare const MessageTray: import("react").ForwardRefExoticComponent>;
export {};
//# sourceMappingURL=message-tray.d.ts.map