import type { AvatarProps, FabProps, PaperProps, StackProps, SxProps, Theme, TypographyProps } from '@mui/material'; import type { ActionBarProps } from '@workwave-tidal/core/components/ActionBar'; import type { EditorProps as TidalEditorProps } from '@workwave-tidal/core/components/Editor'; import type { PropsWithChildren, ReactNode, Ref } from 'react'; import type { InteractionHeaderProps } from './components/Interactions/components/Interaction/components/InteractionHeader.js'; import type { ConversationTexts } from './components/LocaleProvider.js'; export type ConversationEditorProps = PropsWithChildren void; hideSuggestions?: boolean; }>; export type ConversationInteractionsProps = PropsWithChildren<{ /** * The test id to use for the interactions */ testId?: string; conversationEmpty?: ReactNode; }>; export type ConversationProps = PropsWithChildren & { /** * contains a key-value data structure to customize every text used by the component * follow the same pattern as MUI Datagrid, if needed also functions could be stored here */ localeText?: Partial; api?: Ref; slotProps?: { /** * additional props to pass to the root Paper component */ root?: Partial; }; }>; export type ConversationHeaderProps = PropsWithChildren<{ /** * data-testid used for the root Stack component */ testId?: string; /** * additional class name to pass to the root Stack component */ className?: string; slotProps?: { /** * additional props to pass to the ActionBar component */ actionBar?: ActionBarProps; /** * additional props to pass to the root Stack component */ root?: Omit; }; /** * allows to pass additional styles to the root Stack component */ sx?: SxProps; }>; export type ConversationOptions = { /** * if true, the scrollbar will scroll to the end after the message is sent * @default false */ scrollToEndAfterMessageSend: boolean; /** * threshold in pixels before showing the scroll to bottom button * @default 70 */ scrollThresholdBeforeShowScrollToBottom: number; /** * if false, the component will scroll to the bottom when mounted * happen only once * @default false */ preventScrollToBottomOnMount: boolean; /** * if false, the component will maintain the read flow by scrolling to the bottom when new messages are added * this will not happen if the user has scrolled up * @default false */ disableAutoReadFlow: boolean; /** * if true, the Fab to scroll to the bottom will be always hidden * @default false */ hideScrollToBottomFab: boolean; }; export type ConversationInteractionProps = PropsWithChildren<{ /** * Unique ID of the interaction */ id: string; /** * Formatted value of the time of the interaction */ time?: string; /** * The avatar representing the interaction owner * will default to a GenericAvatar provided by the component * @default GenericAvatar */ avatar?: ReactNode; /** * message to render * need to check how to render markup from the server */ message?: ReactNode; /** * The sender of the interaction */ sender?: string; loading?: boolean; loadingComponent?: ReactNode; /** * Message alignment */ alignment?: 'left' | 'right'; /** * The type of the interaction * @default default */ variant?: 'default' | 'outlined'; /** * additional class name to pass to the root Stack component */ className?: string; /** * additional styles to pass to the root */ sx?: SxProps; slotProps?: { /** * additional props to pass to the root Stack component */ root?: Omit; /** * additional props to pass to the avatar component */ avatar?: AvatarProps; /** * additional props to pass to the InteractionHeader component */ interactionHeader?: Partial>; /** * additional props to pass to the SenderTypography component */ senderTypography?: Partial; /** * additional props to pass to the TimeTypography component */ timeTypography?: Partial; /** * additional props to pass to the MessageTypography component */ messageTypography?: Partial; }; /** * Specifies the type of content * if set to `html` the content will be rendered as html * @default text */ contentType?: 'text' | 'html'; }>; export type ScrollToBottomProps = PropsWithChildren<{ /** * Callback to call when the user clicks on the button * @returns void */ onScrollToBottom: () => void; slotProps?: { /** * additional props to pass to the floating action button */ fab?: FabProps; }; /** * animation duration for the built-in bounce animation * if set to 0 the animation will be disabled */ animationDuration?: number; }>; export type InteractionSuggestion = { label?: string; suggestion: string; }; export type ConversationApi = { setOverlay: (children: ReactNode) => void; setWaitingForResponse: (value: boolean) => void; }; export type RatingReaction = 'like' | 'dislike'; export type OnRating = (id: string, reaction: RatingReaction, api: ConversationApi) => void | Promise; //# sourceMappingURL=types.d.ts.map