"use client"; import { useRef } from "react"; import { Paperclip } from "lucide-react"; import { cn } from "@/lib/utils"; interface FileUploadButtonProps { /** Called with the selected File — caller handles upload. */ onSelect: (file: File) => void; disabled?: boolean; className?: string; size?: "sm" | "default"; } function FileUploadButton({ onSelect, disabled, className, size = "default", }: FileUploadButtonProps) { const inputRef = useRef(null); const handleChange = (e: React.ChangeEvent) => { const file = e.target.files?.[0]; if (!file) return; e.target.value = ""; onSelect(file); }; const iconSize = size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4"; const btnSize = size === "sm" ? "h-6 w-6" : "h-7 w-7"; return ( <> ); } export { FileUploadButton, type FileUploadButtonProps };