import { type TextareaHTMLAttributes } from 'react';
import { type VariantProps } from 'class-variance-authority';
export interface AIPromptCommand {
id: string;
label: string;
description?: string;
}
export interface AIPromptModel {
id: string;
label: string;
}
export interface AIPromptAttachment {
id: string;
file: File;
}
export interface AIPromptSubmitPayload {
text: string;
command?: string;
attachments: AIPromptAttachment[];
modelId?: string;
}
type NativeTextareaProps = Omit, 'size' | 'onSubmit' | 'children'>;
declare const rootVariants: (props?: ({
size?: "sm" | "md" | "lg" | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
/** Curated imperative handle for agent / external automation. */
export interface AIPromptInputHandle {
/** Current composer text. */
getValue: () => string;
/** True when text is empty and no attachments are pending. */
isEmpty: () => boolean;
/** True while a submit is in flight. */
isSubmitting: () => boolean;
/** Replace the composer text. */
setValue: (value: string) => void;
/** Clear text and attachments. */
clear: () => void;
/** Programmatically submit. */
submit: () => void;
/** Move keyboard focus into the textarea. */
focus: () => void;
}
export interface AIPromptInputProps extends NativeTextareaProps, VariantProps {
/** Slash-command catalog. The DS owns the menu; apps own the commands. */
commands?: AIPromptCommand[];
/** Model catalog rendered as a Radix Select in the footer. */
models?: AIPromptModel[];
defaultModelId?: string;
modelId?: string;
onModelChange?: (id: string) => void;
/** Maximum attachment size in bytes. */
maxSize?: number;
/** `accept` forwarded to react-dropzone. */
accept?: Record;
/** Optional active context pill — dismissible via Backspace when focused. */
context?: string;
onContextDismiss?: () => void;
onSubmit?: (payload: AIPromptSubmitPayload) => void;
onAttach?: (files: File[]) => void;
onAttachmentRejected?: (reason: string) => void;
minRows?: number;
maxRows?: number;
}
export declare const AIPromptInput: import("react").ForwardRefExoticComponent>;
export {};
//# sourceMappingURL=ai-prompt-input.d.ts.map