import React, { HTMLAttributes } from "react"; import type { AkselStatusColorRole } from "@navikt/ds-tokens/types"; import { AkselColor } from "../types"; import { HeadingProps } from "../typography"; import Bubble, { type ChatBubbleProps } from "./Bubble"; export declare const VARIANTS: readonly ["subtle", "info", "neutral"]; export declare const POSITIONS: readonly ["left", "right"]; export declare const SIZES: readonly ["medium", "small"]; interface ChatProps extends HTMLAttributes { /** * Children of type ``. */ children: React.ReactNode; /** * Name/sender on first bubble. */ name?: string; /** * Timestamp on first bubble. */ timestamp?: string; /** * We recommend using an SVG or plain text initials as avatar. * * **Hidden for screen readers.** */ avatar?: React.ReactNode; /** * @deprecated Use `data-color` prop instead. */ variant?: (typeof VARIANTS)[number]; /** * Positions avatar and bubbles. * @default "left" */ position?: (typeof POSITIONS)[number]; /** * Horizontal position of toptext. * @default Same as position */ toptextPosition?: (typeof POSITIONS)[number]; /** * Affects padding and font size in bubbles. * @default "medium" */ size?: (typeof SIZES)[number]; /** * The heading level for the toptext. * @default "3" */ toptextHeadingLevel?: Exclude; /** * Overrides inherited color. * * We have disallowed status-colors. * @see 🏷️ {@link AkselColor} * @see [📝 Documentation](https://aksel.nav.no/grunnleggende/styling/farger-tokens) */ "data-color"?: Exclude; } interface ChatComponent extends React.ForwardRefExoticComponent> { /** * @see 🏷️ {@link ChatBubbleProps} */ Bubble: typeof Bubble; } /** * A component for communicating a dialog between two or more parties. * * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/chat) * @see 🏷️ {@link ChatProps} * * @example * ```jsx * * Hello! * How can I help you? * * * Hi there! * * ``` */ export declare const Chat: ChatComponent; export default Chat; export { Bubble as ChatBubble }; export type { ChatProps, ChatBubbleProps };