import { attachmentVariants, type AttachmentVariants } from "./variants.ts";
import { cn } from "#lib/utils.ts";

export interface Input extends Marko.Input<"div">, AttachmentVariants {
  state?: "idle" | "uploading" | "processing" | "error" | "done";
}

<const/{
  state = "done",
  size = "default",
  orientation = "horizontal",
  class: className,
  content,
  ...rest
}=input/>

<div
  data-slot="attachment"
  data-state=state
  data-size=size
  data-orientation=orientation
  class=cn(attachmentVariants({ size, orientation }), className)
  ...rest
>
  <${content}/>
</div>
