import { ChannelState } from "../../../state/ChannelState"; import { MessageState } from "../../../state/ConversationInputState"; import { ConversationState } from "../../../state/ConversationState"; import { AriaProps } from "../../AriaProps"; import { ButtonThemeProps } from "../../Button"; import { CSSProps } from "../../CSSProps"; import { MessageInputV2Props } from "./MessageInputV2.definitions"; /** * Properties of Message Input. * * @typedef {MessageInputProps} MessageInputChildrenProps * @property {string} conversationSid - Unique identifier of the Conversation. * @property {ConversationState.ConversationState} [conversation] - Represents a remote conversation of communication. * @property {string} [connectionState] - Represents status of the Conversation */ export interface MessageInputChildrenProps extends MessageInputProps, MessageInputV2Props { channelSid: string; conversationSid: string; channel?: ChannelState; conversation?: ConversationState; connectionState?: string; messageState?: MessageState; legacy?: boolean; } export interface MessageInputState extends MessageState { hasChildInFocus: boolean; } /** * @typedef {"Bubble" | "Line" | "Boxed"} InputAreaStyle - Styles of the message input's input area. * @memberof MessageInput */ type InputAreaStyle = "Bubble" | "Line" | "Boxed"; /** * Style properties for input element * * @typedef MessageInput.InputAreaStyleProps * @property {InputAreaStyle} areaStyle - Styles of the message input's input element. * @property {boolean} [showFocus] - Whether to show focus. */ export interface InputAreaStyleProps extends LegacyStyleProps { areaStyle: InputAreaStyle; showFocus?: boolean; } /** * Style properties for text area container * * @typedef MessageInput.TextAreaContainerStyleProps * @property {boolean} hasChildInFocus - Whether one of the input related child elements is in focus. */ export interface TextAreaContainerStyleProps extends LegacyStyleProps { hasChildInFocus?: boolean; } /** * @typedef Theme.MessageInputThemeProps * @property {CSSProps} Container - Styles for the message input's container * @property {ButtonThemeProps} Button - Styles for the message input's button * @property {CSSProps} FileBox - Styles for the file box that appears when a file gets attached to chat input * @property {ButtonThemeProps} RemoveFileButton - Styles for "remove attached file" button. * @property {ButtonThemeProps} AttachFileButton - Styles for "attach file" button. * @property {ButtonThemeProps} ContentTemplatesButton - Styles for "open content templates" button. */ export interface MessageInputThemeProps { Container: CSSProps; Button: ButtonThemeProps; FileBox: CSSProps; RemoveFileButton: ButtonThemeProps; AttachFileButton: ButtonThemeProps; ContentTemplatesButton: ButtonThemeProps; } /** * Properties of Message Input. * * @typedef MessageInput.MessageInputProps * @property {MessageInputThemeProps} [theme.MessageInput] - theme * @property {InputAreaStyle} [areaStyle=Bubble] - Visual style of the text input element. * @property {string} [disabledReason] - A reason on why MessageInput is disabled. * @property {boolean} [returnKeySendsMessage=true] - Whether pressing the return key should send a message. * @property {number} charLimit - Identifies character limit for a single message. * @property {DynamicComponentChildren} [children] - children * @property {AriaProps} [sendButtonAriaProps] - SendButton aria props * @property {AriaProps} [textAreaAriaProps] - TextArea aria props */ export interface MessageInputProps { areaStyle: InputAreaStyle; disabledReason?: string; returnKeySendsMessage?: boolean; charLimit: number; sendButtonAriaProps?: AriaProps; textAreaAriaProps?: AriaProps; } export declare enum MessageInputChildrenKeys { textarea = "textarea" } /** * Style properties for input element * @private * @typedef MessageInput.LegacyStyleProps * @property {MessageInput.legacy} boolean - Whether new or legacy input component is used */ export interface LegacyStyleProps { legacy?: boolean; } export {};