"use client"; import { useState, useRef } from "react"; import { Button } from "@/components/ui/button"; import { Copy, Check } from "lucide-react"; export default function CopyTextBox({ text = "", wrapText = false, outline = true }) { const [isCopied, setIsCopied] = useState(false); const textRef = useRef(null); const copyToClipboard = async () => { if (textRef.current) { try { await navigator.clipboard.writeText( textRef.current.textContent || "" ); setIsCopied(true); setTimeout(() => setIsCopied(false), 2000); } catch (err) { console.error("Failed to copy text: ", err); } } }; return (
                {text}
            
); }