UNPKG

communication-react-19

Version:

React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)

59 lines 1.77 kB
/// <reference types="react" /> import { AttachmentMetadata } from "../../../../acs-ui-common/src"; import { ChatMessage } from '../../types'; /** * @private */ export declare const onRenderCancelIcon: (className: string) => JSX.Element; /** * @private */ export declare const onRenderSubmitIcon: (className: string) => JSX.Element; /** * Enumeration for whether a message can be sent */ export type MessageState = 'OK' | 'too short' | 'too long'; /** * @private */ export declare function getMessageState(messageText: string, attachments: AttachmentMetadata[]): MessageState; /** * @private */ export declare const getTextValidationErrorMessage: (messageState: string, tooLongString: string, tooShortString: string, imageOverflow?: boolean) => string | undefined; /** * @private * @TODO: Remove when file-sharing feature becomes stable. */ export declare function getMessageWithAttachmentMetadata(message: ChatMessage): AttachmentMetadata[] | undefined; /** * @private */ interface Action { type: string; } /** * Currently `Actions` only have one action which is to remove. * But in the future, we may have more actions like `add`, `update`, etc. * And this action would be a uinon of all those actions. * i.e. `type Actions = RemoveAction | AddAction | UpdateAction;` * @private */ type Actions = RemoveAction; /** * @private */ interface RemoveAction extends Action { type: 'remove'; id: string; } /** * @internal */ export declare const attachmentMetadataReducer: (state: AttachmentMetadata[], action: Actions) => AttachmentMetadata[]; /** * @internal */ export declare const doesMessageContainMultipleAttachments: (message: ChatMessage) => boolean; export {}; //# sourceMappingURL=ChatMessageComponentAsEditBoxUtils.d.ts.map