import React from 'react'; import type { CustomAudioRecordingConfig } from '../MediaRecorder'; export type EmojiSearchIndexResult = { id: string; name: string; skins: Array<{ native: string; }>; emoticons?: Array; native?: string; }; export interface EmojiSearchIndex { search: (query: string) => PromiseLike> | Array | null; } export type MessageComposerProps = { /** * Additional props for the underlying textarea. `defaultValue`, `value`, `style` and `disabled` * are excluded because the composer controls them. `className` is added to the textarea's * classes, next to a `TextareaComposer` `className`. `onPaste` runs before the composer's paste * handling; calling `event.preventDefault()` in it skips that handling. A `TextareaComposer` * `onPaste` prop replaces this one. * [Available props](https://www.npmjs.com/package/react-textarea-autosize) */ additionalTextareaProps?: Omit, 'defaultValue' | 'style' | 'disabled' | 'value'>; /** * When enabled, recorded messages are not sent immediately. They stack up with other attachments * in the composer, so the user can send several attachments in the same message. */ asyncMessagesMultiSendEnabled?: boolean; /** * Audio recording parameters for voice messages. A new object with the same values keeps the * recorder; changed values replace it, which cancels a recording in progress. Functions in it, * such as `transcoderConfig.encoder`, compare by identity, so pass a stable one. */ audioRecordingConfig?: CustomAudioRecordingConfig; /** Whether the UI to record voice messages is shown. */ audioRecordingEnabled?: boolean; /** If true, focuses the text input on mount. */ focus?: boolean; /** * Names the file of a voice recording from its MIME type. Defaults to * `audio_recording_.`. */ generateRecordingTitle?: (mimeType: string) => string; hideSendButton?: boolean; /** Max number of rows the textarea can grow to. Defaults to 10. */ maxRows?: number; /** Min number of rows of the textarea. While empty, it has a single row unless this is set. */ minRows?: number; /** * Decides whether a keydown submits the message. By default `Enter` submits unless an IME * composition is active, and `Shift`+`Enter` inserts a new line. * * ```tsx * const defaultShouldSubmit = (event) => * event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing; * ``` */ shouldSubmit?: (event: React.KeyboardEvent) => boolean; }; declare const UnMemoizedMessageComposer: (props: MessageComposerProps) => import("react/jsx-runtime").JSX.Element; /** * Provides the composer context and dialog manager to the `MessageComposerUI` it renders. */ export declare const MessageComposer: typeof UnMemoizedMessageComposer; export {}; //# sourceMappingURL=MessageComposer.d.ts.map