import * as React from 'react'; import { type AIInputProps } from '../AIInput/index.js'; import { type AIMessageProps } from '../AIMessage/index.js'; export interface ChatMessage extends Omit { id: string; } type AIContainerAutoScrollKey = string | number | null; export interface AIContainerProps { /** Children for compound component mode */ children?: React.ReactNode; /** Array of chat messages to display (legacy mode or context for compound mode) */ messages?: ChatMessage[]; /** Props for the chat input (legacy mode) */ inputProps?: Omit; /** Whether to show the minimize button */ showMinimize?: boolean; /** Callback when minimize is clicked */ onMinimize?: () => void; /** Custom content to render in the message area (legacy mode) */ emptyContent?: React.ReactNode; /** Whether to show scroll-to-bottom button (legacy mode) */ showScrollButton?: boolean; /** Threshold for showing scroll button (pixels from bottom) */ scrollThreshold?: number; /** Whether to auto-scroll on new messages */ autoScrollOnNewMessage?: boolean; /** Explicit signal for child-rendered transcripts; changing the key triggers auto-scroll */ autoScrollKey?: AIContainerAutoScrollKey; /** Whether to show the top fade gradient on the message area */ showTopFade?: boolean; /** Additional class name */ className?: string; /** Class name for the message area (legacy mode) */ messageAreaClassName?: string; } interface AIContainerContextValue { containerRef: React.RefObject; anchorRef: React.RefObject; isAtBottom: boolean; scrollToBottom: (behavior?: ScrollBehavior) => void; handleUserScroll: () => void; triggerAutoScroll: () => void; messages: ChatMessage[]; hasMessages: boolean; inputHasText: boolean; inputIsFocused: boolean; setInputHasText: (value: boolean) => void; setInputIsFocused: (value: boolean) => void; } export interface AIContainerHeaderProps { children: React.ReactNode; className?: string; } export interface AIContainerMessagesProps { /** Children for compound component mode (preferred over messages array if provided) */ children?: React.ReactNode; renderMessage?: (message: ChatMessage, index: number) => React.ReactNode; messages?: ChatMessage[]; emptyContent?: React.ReactNode; showScrollButton?: boolean; /** Explicit signal for child-rendered transcripts; changing the key triggers auto-scroll */ autoScrollKey?: AIContainerAutoScrollKey; /** Whether to show the top fade gradient */ showTopFade?: boolean; className?: string; } export interface AIContainerFooterProps { children: React.ReactNode; className?: string; } export interface AIContainerInputProps { before?: React.ReactNode; after?: React.ReactNode; children?: React.ReactNode; inputProps?: Omit; className?: string; } declare const AIContainerContext: React.Context; declare function AIContainerHeader({ children, className, }: AIContainerHeaderProps): React.ReactElement; declare function AIContainerMessages({ children, renderMessage, messages: messagesProp, emptyContent, showScrollButton, autoScrollKey, showTopFade, className, }: AIContainerMessagesProps): React.ReactElement; declare function AIContainerFooter({ children, className, }: AIContainerFooterProps): React.ReactElement; declare function AIContainerInput({ before, after, children, inputProps, className, }: AIContainerInputProps): React.ReactElement; declare function AIContainer({ children, messages, inputProps, showMinimize, onMinimize, emptyContent, showScrollButton, scrollThreshold, autoScrollOnNewMessage, autoScrollKey, showTopFade, className, messageAreaClassName, }: AIContainerProps): React.ReactElement; declare const AIContainerCompound: typeof AIContainer & { Header: typeof AIContainerHeader; Messages: typeof AIContainerMessages; Footer: typeof AIContainerFooter; Input: typeof AIContainerInput; }; export { AIContainerCompound as AIContainer, AIContainerContext };