import * as React from 'react' import { cva, type VariantProps } from 'class-variance-authority' import { cn } from '@/lib/utils' const attachmentVariants = cva( 'group/attachment flex items-center gap-3 rounded-md border bg-bg-elevated px-3 py-2 text-sm text-text shadow-sm transition-colors', { variants: { state: { pending: 'border-border bg-bg-elevated', uploading: 'border-primary-border bg-primary-bg text-text', done: 'border-success-border bg-success-bg text-text', error: 'border-error-border bg-error-bg text-text', }, }, defaultVariants: { state: 'pending', }, } ) export interface AttachmentProps extends React.HTMLAttributes, VariantProps {} const Attachment = React.forwardRef( ({ className, state = 'pending', ...props }, ref) => (
) ) Attachment.displayName = 'Attachment' export type AttachmentMediaProps = React.HTMLAttributes const AttachmentMedia = React.forwardRef( ({ className, ...props }, ref) => (
) ) AttachmentMedia.displayName = 'AttachmentMedia' export type AttachmentContentProps = React.HTMLAttributes const AttachmentContent = React.forwardRef( ({ className, ...props }, ref) => (
) ) AttachmentContent.displayName = 'AttachmentContent' export type AttachmentTitleProps = React.HTMLAttributes const AttachmentTitle = React.forwardRef( ({ className, ...props }, ref) => (
) ) AttachmentTitle.displayName = 'AttachmentTitle' export type AttachmentDescriptionProps = React.HTMLAttributes const AttachmentDescription = React.forwardRef( ({ className, ...props }, ref) => (
) ) AttachmentDescription.displayName = 'AttachmentDescription' export type AttachmentActionsProps = React.HTMLAttributes const AttachmentActions = React.forwardRef( ({ className, ...props }, ref) => (
) ) AttachmentActions.displayName = 'AttachmentActions' export type AttachmentActionProps = React.ButtonHTMLAttributes const AttachmentAction = React.forwardRef( ({ className, type = 'button', ...props }, ref) => (