import * as React from "react" import { mergeProps } from "@base-ui/react/merge-props" import { useRender } from "@base-ui/react/use-render" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "cn" import { Button } from "@/registry/bases/base/ui/button" const attachmentVariants = cva( "cn-attachment group/attachment relative flex max-w-full min-w-0 shrink-0 flex-wrap border bg-card text-card-foreground transition-colors has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", { variants: { size: { default: "cn-attachment-size-default", sm: "cn-attachment-size-sm", xs: "cn-attachment-size-xs", }, orientation: { horizontal: "cn-attachment-orientation-horizontal items-center", vertical: "cn-attachment-orientation-vertical flex-col", }, }, } ) function Attachment({ className, state = "done", size = "default", orientation = "horizontal", ...props }: React.ComponentProps<"div"> & VariantProps & { state?: "idle" | "uploading" | "processing" | "error" | "done" }) { return (
) } const attachmentMediaVariants = cva( "cn-attachment-media relative flex aspect-square shrink-0 items-center justify-center overflow-hidden group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive [&_svg]:pointer-events-none", { variants: { variant: { icon: "cn-attachment-media-variant-icon", image: "cn-attachment-media-variant-image *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover", }, }, defaultVariants: { variant: "icon", }, } ) function AttachmentMedia({ className, variant = "icon", ...props }: React.ComponentProps<"div"> & VariantProps) { return (
) } function AttachmentContent({ className, ...props }: React.ComponentProps<"div">) { return (
) } function AttachmentTitle({ className, ...props }: React.ComponentProps<"span">) { return ( ) } function AttachmentDescription({ className, ...props }: React.ComponentProps<"span">) { return ( ) } function AttachmentActions({ className, ...props }: React.ComponentProps<"div">) { return (
) } function AttachmentAction({ className, variant, size = "icon-xs", ...props }: React.ComponentProps) { return (