import { type ComponentPropsWithoutRef, type ReactNode } from 'react'; import { StateStore } from '@stream-io/state-store'; import { AttachmentPreview } from './attachment-preview'; import { type UseSpeechToTextOptions } from './use-speech-to-text'; declare const FileInput: { ({ labelProps, ...restProps }: ComponentPropsWithoutRef<"input"> & { labelProps?: ComponentPropsWithoutRef<"label">; }): import("react/jsx-runtime").JSX.Element; WithStableId: ({ children, }: { children?: ReactNode | (({ id }: { id: string; }) => ReactNode); }) => import("react/jsx-runtime").JSX.Element; }; export type AIMessageComposerStore = { attachments: { id: string; file: File; meta?: Record; }[]; text: string; disabled?: boolean; }; export declare const useAIMessageComposerContext: () => StateStore; export declare const useAttachments: () => { attachments: { id: string; file: File; meta?: Record; }[]; removeAttachment: (idOrFile: string | File) => void; updateAttachments: (idsOrAttachments: (string | AIMessageComposerStore["attachments"][number])[], update: (attachment: AIMessageComposerStore["attachments"][number]) => AIMessageComposerStore["attachments"][number]) => void; }; export declare const useText: () => { text: string; setText: (text: string) => void; }; export declare const useIsDisabled: () => { disabled: boolean | undefined; setDisabled: (disabled: boolean) => void; }; type AIMessageComposerProps = ComponentPropsWithoutRef<'form'> & { /** * Resets a value of an input with name `attachments` and of type `file` when user selects files so that * they can select the same file again if needed. * * @default true */ resetAttachmentsOnSelect?: boolean; nameMapping?: { message?: string; attachments?: string; }; /** * Disables the composer. */ disabled?: boolean; }; interface AIMessageComposer { (props: AIMessageComposerProps): JSX.Element; FileInput: typeof FileInput; TextInput: typeof TextInput; SpeechToTextButton: typeof SpeechToTextButton; SubmitButton: typeof SubmitButton; ModelSelect: typeof ModelSelect; AttachmentPreview: typeof AttachmentPreview; } export declare const AIMessageComposer: AIMessageComposer; declare const TextInput: (props: ComponentPropsWithoutRef<"input">) => import("react/jsx-runtime").JSX.Element; declare const SpeechToTextButton: (props: ComponentPropsWithoutRef<"button"> & { options?: UseSpeechToTextOptions; }) => import("react/jsx-runtime").JSX.Element; declare const SubmitButton: ({ active, ...restProps }: ComponentPropsWithoutRef<"button"> & { active?: boolean; }) => import("react/jsx-runtime").JSX.Element; declare const ModelSelect: (props: ComponentPropsWithoutRef<"select"> & { options?: ReactNode; }) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=ai-message-composer.d.ts.map