import React from "react"; import { Check, Copy } from "lucide-react"; import { cn } from "../../../../lib/utils"; import { Button } from "../../../ui/button"; type CopyableCodeBlockProps = { label?: string; value: string; copyKey: string; copied: string | null; onCopy: (key: string, text: string) => void; copyLabel: string; copiedLabel: string; emptyLabel?: string; className?: string; }; export const CopyableCodeBlock: React.FC = ({ label, value, copyKey, copied, onCopy, copyLabel, copiedLabel, emptyLabel, className, }) => { const display = value || emptyLabel || ""; const canCopy = Boolean(value); const isCopied = copied === copyKey; return (
{label ? (
{label}
) : null}
          {display}
        
); };