"use client"; import { useState } from "react"; import { CheckCircleIcon, CopyIcon, XCircleIcon } from "@/components/icons"; import { copyText } from "@/lib/clipboard"; import { useI18n } from "@/lib/i18n"; import { cn } from "@/lib/utils"; /** Small square copy control used by chat message actions and code blocks. */ export function CopyIconButton({ text, className }: { text: string; className?: string }) { const { t } = useI18n(); const [state, setState] = useState<"idle" | "copied" | "failed">("idle"); return ( ); }