import { ReactNode } from 'react';
import type { FunctionComponent, HTMLProps, MouseEvent as ReactMouseEvent, Ref } from 'react';
import { Options } from 'react-markdown';
import { AlertProps, AvatarProps, ButtonProps, ExpandableSectionProps, ExpandableSectionToggleProps, FormProps, LabelGroupProps } from '@patternfly/react-core';
import { ActionProps } from '../ResponseActions/ResponseActions';
import { SourcesCardProps } from '../SourcesCard';
import { QuickStart, QuickstartAction } from './QuickStarts/types';
import QuickResponse from './QuickResponse/QuickResponse';
import { UserFeedbackProps } from './UserFeedback/UserFeedback';
import { UserFeedbackCompleteProps } from './UserFeedback/UserFeedbackComplete';
import { TableProps } from '@patternfly/react-table';
import { PluggableList } from 'unified';
export interface MessageAttachment {
    /** Name of file attached to the message */
    name: string;
    /** Unique identifier of file attached to the message */
    id?: string | number;
    /** Callback for when attachment label is clicked */
    onClick?: (event: React.MouseEvent, name: string, id?: string | number) => void;
    /** Callback for when attachment label is closed */
    onClose?: (event: React.MouseEvent, name: string, id?: string | number) => void;
    /** Whether file is loading */
    isLoading?: boolean;
    /** Aria label for attachment close button */
    closeButtonAriaLabel?: string;
    /** Custom test id for the language in the attachment component */
    languageTestId?: string;
    /** Custom test id for the loading spinner in the attachment component */
    spinnerTestId?: string;
}
export interface MessageExtraContent {
    /** Content to display before the main content */
    beforeMainContent?: ReactNode;
    /** Content to display after the main content */
    afterMainContent?: ReactNode;
    /** Content to display at the end */
    endContent?: ReactNode;
}
export interface MessageProps extends Omit<HTMLProps<HTMLDivElement>, 'role'> {
    /** Unique id for message */
    id?: string;
    /** Role of the user sending the message */
    role: 'user' | 'bot';
    /** Message content */
    content?: string;
    /** Extra Message content */
    extraContent?: MessageExtraContent;
    /** Name of the user */
    name?: string;
    /** Avatar src for the user */
    avatar: string;
    /** Timestamp for the message */
    timestamp?: string;
    /** Set this to true if message is being loaded */
    isLoading?: boolean;
    /** Array of attachments attached to a message */
    attachments?: MessageAttachment[];
    /** Props for message actions, such as feedback (positive or negative), copy button, edit message, share, and listen */
    actions?: {
        [key: string]: ActionProps;
    };
    /** Sources for message */
    sources?: SourcesCardProps;
    /** Label for the English word "AI," used to tag messages with role "bot" */
    botWord?: string;
    /** Label for the English "Loading message," displayed to screenreaders when loading a message */
    loadingWord?: string;
    /** Props for code blocks */
    codeBlockProps?: {
        /** Aria label applied to code blocks */
        'aria-label'?: string;
        /** Class name applied to code blocks */
        className?: string;
        /** Whether code blocks are expandable */
        isExpandable?: boolean;
        /** Length of text initially shown in expandable code blocks; defaults to 10 characters */
        maxLength?: number;
        /** Additional props passed to expandable section if isExpandable is applied */
        expandableSectionProps?: Omit<ExpandableSectionProps, 'ref'>;
        /** Additional props passed to expandable toggle if isExpandable is applied */
        expandableSectionToggleProps?: ExpandableSectionToggleProps;
        /** Link text applied to expandable toggle when expanded */
        expandedText?: string;
        /** Link text applied to expandable toggle when collapsed */
        collapsedText?: string;
    };
    /** Props for quick responses */
    quickResponses?: QuickResponse[];
    /** Props for quick responses container */
    quickResponseContainerProps?: Omit<LabelGroupProps, 'ref'>;
    /** Props for user feedback card */
    userFeedbackForm?: Omit<UserFeedbackProps, 'ref'>;
    /** Props for user feedback response */
    userFeedbackComplete?: Omit<UserFeedbackCompleteProps, 'ref'>;
    /** Whether avatar is round */
    hasRoundAvatar?: boolean;
    /** Any additional props applied to the avatar, for additional customization  */
    avatarProps?: Omit<AvatarProps, 'alt'>;
    /** Props for QuickStart card */
    quickStarts?: {
        quickStart: QuickStart;
        onSelectQuickStart: (id?: string) => void;
        minuteWord?: string;
        minuteWordPlural?: string;
        prerequisiteWord?: string;
        prerequisiteWordPlural?: string;
        quickStartButtonAriaLabel?: string;
        className?: string;
        onClick?: () => void;
        action?: QuickstartAction;
    };
    /** Turns the container into a live region so that changes to content within the Message, such as appending a feedback card, are reliably announced to assistive technology. */
    isLiveRegion?: boolean;
    /** Ref applied to message  */
    innerRef?: Ref<HTMLDivElement>;
    /** Props for table message. It is important to include a detailed aria-label that describes the purpose of the table. */
    tableProps?: Required<Pick<TableProps, 'aria-label'>> & TableProps;
    /** Additional rehype plugins passed from the consumer */
    additionalRehypePlugins?: PluggableList;
    /** Whether to open links in message in new tab. */
    openLinkInNewTab?: boolean;
    /** Optional inline error message that can be displayed in the message */
    error?: AlertProps;
    /** Props for links */
    linkProps?: ButtonProps;
    /** Whether message is in edit mode */
    isEditable?: boolean;
    /** Placeholder for edit input */
    editPlaceholder?: string;
    /** Label for the English word "Update" used in edit mode. */
    updateWord?: string;
    /** Label for the English word "Cancel" used in edit mode. */
    cancelWord?: string;
    /** Callback function for when edit mode update button is clicked */
    onEditUpdate?: (event: ReactMouseEvent<HTMLButtonElement, MouseEvent>) => void;
    /** Callback functionf or when edit cancel update button is clicked */
    onEditCancel?: (event: ReactMouseEvent<HTMLButtonElement, MouseEvent>) => void;
    /** Ref applied to editable message input */
    inputRef?: Ref<HTMLTextAreaElement>;
    /** Props for edit form */
    editFormProps?: FormProps;
    /** Sets message to compact styling. */
    isCompact?: boolean;
    /** Disables markdown parsing for message, allowing only text input */
    isMarkdownDisabled?: boolean;
    /** Allows passing additional props down to markdown parser react-markdown, such as allowedElements and disallowedElements. See https://github.com/remarkjs/react-markdown?tab=readme-ov-file#options for options */
    reactMarkdownProps?: Options;
}
export declare const MessageBase: FunctionComponent<MessageProps>;
declare const Message: import("react").ForwardRefExoticComponent<Omit<MessageProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
export default Message;
