export declare const copyButtonTemplate = "\"use client\";\nimport { useCallback, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { resetButton, interactiveStyles } from \"cherry-styled-components\";\nimport { Theme } from \"@/app/theme\";\nimport { Icon } from \"@/components/layout/Icon\";\n\n/* Icon-only copy-to-clipboard button. Same look/behaviour as the copy button in\n the code block: interactiveStyles supplies the border highlight on hover plus\n the focus/active rings, and the icon swaps to a check in success green for two\n seconds after a successful copy. Theme tokens swap for dark mode on their own,\n so no :root[data-theme=\"dark\"] override is needed. */\nconst StyledCopyButton = styled.button<{ theme: Theme; $copied: boolean }>`\n ${resetButton}\n ${interactiveStyles}\n background: ${({ theme }) => theme.colors.light};\n border-color: ${({ theme }) => theme.colors.grayLight};\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & svg.lucide {\n margin: 0;\n color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.grayDark};\n }\n`;\n\ninterface CopyButtonProps {\n text: string;\n size?: number;\n label?: string;\n className?: string;\n}\n\nexport function CopyButton({\n text,\n size = 12,\n label = \"Copy\",\n className,\n}: CopyButtonProps) {\n const [copied, setCopied] = useState(false);\n\n const handleCopy = useCallback(async () => {\n try {\n await navigator.clipboard.writeText(text);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch (err) {\n console.error(\"Failed to copy:\", err);\n }\n }, [text]);\n\n return (\n \n \n \n );\n}\n";