import type { Ref, PropsWithoutRef, ReactNode, RefObject, KeyboardEvent } from 'react'; import type { ForwardRefForwardPropsComponent, FileItemProps } from '@pega/cosmos-react-core'; export type SpecialKeysConfig = { /** Collection of specialKeys */ keys: string[]; /** onSpecialKey is fired when a special key is typed in Textarea */ onSpecialKey: (e: KeyboardEvent, key: string) => void; }; export interface ChatComposerProps { /** Place holder */ placeholder?: string; /** Default message to populate on load */ defaultMessage?: string; /** Max character limit */ maxLength?: number; /** Callback when send button is clicked */ onSend: (message: string) => void; /** Enter / Return key sends message */ enterKeySendsMessage?: boolean; /** Max number of attachments to be allowed in chat composer. * If zero is passed, add attachments icon will be hidden. same rule applies if prop is not passed. * If attachments added are >= maxAttachments, add attachments icon will be disabled. */ maxAttachments?: number; /** show/hide emoji */ showEmoji?: boolean; /** Attachments list */ attachments?: FileItemProps[]; /** Callback when attachment icon is clicked */ onAddAttachment?: () => void; /** Special Keys configuration */ specialKeysConfig?: SpecialKeysConfig; /** Disables the composer area */ disabled?: boolean; /** Children */ children?: ReactNode; /** On suggest reply click */ onSuggestReplyClick?: () => void; /** * Disable suggest reply button * @default false */ disableSuggestReply?: boolean; /** On join coversation click */ joinConversation?: { onClick: () => void; disabled?: boolean; }; /** Ref to the Imperative handle */ ref?: Ref; } export declare const StyledAttachmentsListContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit, "disabled" | "type" | "items" | "onDownloadAll">, "ref"> & import("react").RefAttributes, "ref"> & { ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject | null | undefined; }) | (Omit, "disabled" | "type" | "items" | "onDownloadAll">, "ref"> & import("react").RefAttributes, "ref"> & { ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject | null | undefined; }), import("styled-components/dist/types").BaseObject>> & string & Omit & import("react").RefAttributes>, keyof import("react").Component>; export declare const StyledJoinConversation: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit & import("react").RefAttributes & import("@pega/cosmos-react-core").ForwardProps, "ref"> & { ref?: ((instance: HTMLAnchorElement | HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject | null | undefined; }, never>> & string & Omit, keyof import("react").Component>; export interface ChatComposerImperativeHandleProps { /** Function to append a message */ appendToMessage: (appendMessage: string, position?: 'cursor' | 'start' | 'end' | 'specialKey') => void; /** Actual ref to Chat composer component */ chatComposerRef: RefObject; textAreaRef: RefObject; } declare const ChatComposer: ForwardRefForwardPropsComponent; export default ChatComposer; //# sourceMappingURL=ChatComposer.d.ts.map