import { AccessibilityProps } from '../shared/index.js';

interface MessageReaction {
    emoji: string;
    count: number;
    userReacted: boolean;
}
interface MessageAttachment {
    id: string;
    name: string;
    url: string;
    type: string;
    size?: number;
}
interface MessageData {
    /** Unique message ID */
    id: string;
    /** Author display info */
    author: {
        id: string;
        name: string;
        avatarUrl?: string;
    };
    /** Message content (can contain markdown) */
    content: string;
    /** Message timestamp */
    timestamp: Date;
    /** Reactions on this message */
    reactions?: MessageReaction[];
    /** Threaded replies */
    replies?: MessageData[];
    /** File attachments */
    attachments?: MessageAttachment[];
    /** Whether this message has been edited */
    edited?: boolean;
}
interface ThreadViewProps {
    /** Messages to display */
    messages: MessageData[];
    /** Callback when a reply is sent */
    onReply?: (messageId: string, content: string) => void;
    /** Callback when a reaction is toggled */
    onReact?: (messageId: string, emoji: string) => void;
    /** Current user ID (for highlighting own messages) */
    currentUserId?: string;
}
interface ThreadViewState {
    messages: MessageData[];
    replyingTo: string | null;
}
interface ThreadViewAPI {
    /** Current state */
    state: ThreadViewState;
    /** Start replying to a message */
    startReply(messageId: string): void;
    /** Cancel reply */
    cancelReply(): void;
    /** Send a reply */
    reply(messageId: string, content: string): void;
    /** Toggle a reaction on a message */
    react(messageId: string, emoji: string): void;
    /** Format a timestamp for display */
    formatTimestamp(date: Date): string;
    /** Format relative time (e.g., "2 minutes ago") */
    formatRelativeTime(date: Date): string;
    /** ARIA props for the thread container */
    ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
    /** Get ARIA props for a message */
    getMessageAriaProps(message: MessageData): Record<string, unknown>;
    /** Get ARIA props for a reply button */
    getReplyButtonAriaProps(messageId: string): Record<string, unknown>;
    /** Generated IDs */
    ids: {
        thread: string;
        label: string;
    };
}
declare function formatTimestamp(date: Date): string;
declare function formatRelativeTime(date: Date, now?: Date): string;
declare function createThreadView(props: ThreadViewProps): ThreadViewAPI;

declare const threadContainerStyles = "flex flex-col gap-1";
declare const threadMessageStyles = "flex gap-3 px-4 py-2 hover:bg-accent/50 rounded-md transition-colors group";
declare const threadAvatarStyles = "h-9 w-9 rounded-full bg-muted flex items-center justify-center text-sm font-medium overflow-hidden flex-shrink-0";
declare const threadContentStyles = "flex-1 min-w-0";
declare const threadAuthorStyles = "font-semibold text-sm";
declare const threadTimestampStyles = "text-xs text-muted-foreground ml-2";
declare const threadBodyStyles = "text-sm mt-0.5 whitespace-pre-wrap break-words";
declare const threadReactionsStyles = "flex flex-wrap gap-1 mt-1";
declare const threadReplyIndicatorStyles = "flex items-center gap-1 mt-1 text-xs text-primary cursor-pointer hover:underline";
declare const threadActionsStyles = "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity";
declare const threadAttachmentStyles = "flex items-center gap-2 mt-1 p-2 rounded border text-xs bg-muted/50";
declare const threadEditedStyles = "text-xs text-muted-foreground ml-1";

export { type MessageAttachment, type MessageData, type MessageReaction, type ThreadViewAPI, type ThreadViewProps, type ThreadViewState, createThreadView, formatRelativeTime, formatTimestamp, threadActionsStyles, threadAttachmentStyles, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadEditedStyles, threadMessageStyles, threadReactionsStyles, threadReplyIndicatorStyles, threadTimestampStyles };
