import * as React from 'react' import { cva, type VariantProps } from 'class-variance-authority' import { cn } from '@/lib/utils' const bubbleVariants = cva('flex max-w-full flex-col gap-1', { variants: { align: { start: 'items-start', end: 'items-end', }, }, defaultVariants: { align: 'start', }, }) const bubbleContentVariants = cva( 'max-w-[min(752px,100%)] rounded-lg px-3 py-2 text-sm leading-sm shadow-sm', { variants: { variant: { received: 'bg-bg-elevated text-text border border-border', sent: 'bg-sage-bg text-text', note: 'bg-fill-secondary text-text-secondary', ghost: 'bg-transparent px-0 py-0 shadow-none', }, }, defaultVariants: { variant: 'received', }, } ) export interface BubbleProps extends React.HTMLAttributes, VariantProps {} const Bubble = React.forwardRef( ({ className, align = 'start', ...props }, ref) => (
) ) Bubble.displayName = 'Bubble' export interface BubbleContentProps extends React.HTMLAttributes, VariantProps {} const BubbleContent = React.forwardRef( ({ className, variant = 'received', ...props }, ref) => (
) ) BubbleContent.displayName = 'BubbleContent' export type BubbleGroupProps = React.HTMLAttributes const BubbleGroup = React.forwardRef( ({ className, ...props }, ref) => (
) ) BubbleGroup.displayName = 'BubbleGroup' export type BubbleReactionsProps = React.HTMLAttributes const BubbleReactions = React.forwardRef( ({ className, ...props }, ref) => (
) ) BubbleReactions.displayName = 'BubbleReactions' export { Bubble, BubbleContent, BubbleGroup, BubbleReactions, bubbleVariants, bubbleContentVariants, }