'use client' import type { ReactNode } from 'react' import { cn } from '@langgenius/dify-ui/cn' import { toast } from '@langgenius/dify-ui/toast' import { useClipboard } from 'foxact/use-clipboard' import { useTranslation } from 'react-i18next' type CopyPillProps = { label: string value: string prefix?: ReactNode className?: string } export function CopyPill({ label, value, prefix, className }: CopyPillProps) { const { t } = useTranslation('deployments') const { copied, copy } = useClipboard({ onCopyError: () => { toast.error(t(($) => $['access.copyFailed'])) }, }) return (