import type { MentionItem, ContextInputValue, MentionTrigger } from "@choiceform/design-system";
import type { ExtendedPlanStep } from "~/stores/plan-store";
import type { Attachment, UploadFunction } from "~/types";
export interface PromptInputStyleProps {
    className?: string;
    maxHeight: number;
    minHeight: number;
    placeholder?: string;
    size: "default" | "large";
    styles: React.CSSProperties;
    variant: "default" | "dark";
}
export interface PromptInputRefs {
    contextInputRef: React.RefObject<HTMLDivElement>;
    inputContainerRef: React.RefObject<HTMLDivElement>;
}
export interface PromptInputState {
    currentPlan: ExtendedPlanStep[] | null;
    hasPendingMessages: boolean;
    inputValue: ContextInputValue;
    isDeepThinkingEnabled: boolean;
    isInputFocused: boolean;
    isStreaming: boolean;
    modelMenuOpen: boolean;
}
export interface DragHandlers {
    onDragEnter: (e: React.DragEvent) => void;
    onDragLeave: (e: React.DragEvent) => void;
    onDragOver: (e: React.DragEvent) => void;
    onDrop: (e: React.DragEvent) => void;
    onPaste: (e: React.ClipboardEvent) => void;
}
export interface DragContextType {
    addAttachments: (files: Attachment[]) => void;
    attachments: Attachment[];
    cleanupAbortController: (id: string) => void;
    clearAttachments: () => void;
    createAbortController: (id: string) => AbortController;
    getAbortController: (id: string) => AbortController | undefined;
    getFileById: (id: string) => File | undefined;
    handleFileInput: (e: React.ChangeEvent<HTMLInputElement>) => void;
    handlers: DragHandlers;
    isDragging: boolean;
    openFilePicker: () => void;
    processFiles: (files: File[]) => void;
    removeAttachment: (id: string) => void;
    setAttachmentError: (id: string, error: string) => void;
    setAttachmentUploading: (id: string, uploading: boolean) => void;
    setDropEnabled: (enabled: boolean) => void;
    updateAttachmentProgress: (id: string, progress: number) => void;
    updateAttachmentUrl: (id: string, url: string) => void;
}
export interface PromptInputAttachmentState {
    attachmentEnabled: boolean;
    dragCtx: DragContextType | null;
    hasUnuploadedAttachments: boolean;
    isCurrentModelMultimodal: boolean;
    removeAttachment: (id: string) => void;
}
export interface PromptInputVoiceState {
    handleVoiceClick: () => void;
    handleVoiceMouseDown: () => void;
    handleVoiceMouseUp: () => void;
    isVoiceListening: boolean;
    isVoiceSupported: boolean;
}
export interface SendButtonState {
    addQueue: boolean;
    disabled: boolean;
    hasContent: boolean;
    icon: string;
    isStreaming: boolean;
}
export interface StreamingStatus {
    currentChatId?: string | null;
    currentMessageId?: string | null;
    isStreaming: boolean;
}
export interface PromptInputControlState {
    sendButtonState: SendButtonState;
    sendButtonTooltip: string | null;
    streamingStatus: StreamingStatus;
}
export interface PromptInputHandlers {
    clearInput: () => void;
    focusInput: () => void;
    handleCompositionEnd: () => void;
    handleCompositionStart: () => void;
    handleFileButtonClick: () => void;
    handleInputChange: (value: ContextInputValue) => void;
    handleKeyDown: (e: React.KeyboardEvent<Element>) => void;
    handleModelMenuKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => void;
    handleSendMessageClick: () => void;
    handleStopAndRollback: () => void;
    sendJumpQueueMessage: (messageId: string) => void;
    setInputValue: (value: ContextInputValue) => void;
    setIsInputFocused: (focused: boolean) => void;
    setModelMenuOpen: (open: boolean) => void;
    toggleDeepThinking: () => void;
}
export interface PromptInputMethods {
    enableModalSelection?: boolean;
    getCurrentModelId: () => string | undefined;
}
export interface PromptInputCallbacks {
    onAttachmentsChange?: (attachments: Attachment[]) => void;
    onChange?: (value: ContextInputValue) => void;
    onCreateNewChat?: () => string;
    onFileUpload?: UploadFunction;
    onFileUploadError?: (error: string) => void;
    onMentionSelect?: (mention: MentionItem, trigger: string) => void;
    onSendMessage?: (content: string, chatId: string, attachments?: Attachment[], modelId?: string, messageId?: string) => Promise<void>;
}
export interface PromptInputMentionProps {
    mentionPrefix?: string;
    mentionTriggers?: MentionTrigger[];
}
export interface PromptInputContextValue extends PromptInputStyleProps, PromptInputRefs, PromptInputState, PromptInputAttachmentState, PromptInputVoiceState, PromptInputControlState, PromptInputHandlers, PromptInputMethods, PromptInputCallbacks, PromptInputMentionProps {
}
export interface PromptInputProps {
    beforeOnSendMessage?: () => Promise<boolean>;
    children?: React.ReactNode;
    className?: string;
    enableModalSelection?: boolean;
    maxHeight?: number;
    mentionPrefix?: string;
    mentionTriggers?: MentionTrigger[];
    minHeight?: number;
    onAttachmentsChange?: (attachments: Attachment[]) => void;
    onChange?: (value: ContextInputValue) => void;
    onCreateNewChat?: () => string;
    onFileUpload?: UploadFunction;
    onFileUploadError?: (error: string) => void;
    onMentionSelect?: (mention: MentionItem, trigger: string) => void;
    onSendMessage?: (content: string, chatId: string, attachments?: Attachment[], modelId?: string, messageId?: string) => Promise<void>;
    placeholder?: string;
    shouldStickToBottom?: React.MutableRefObject<boolean>;
    size?: "default" | "large";
    value?: ContextInputValue;
    variant?: "default" | "dark";
}
