'use client'; import { useState } from 'react'; import CopyButton from './CopyButton'; interface KeyDisplayProps { apiKey: string; label?: string; className?: string; } export default function KeyDisplay({ apiKey, label = 'API Key', className = '' }: KeyDisplayProps) { const [revealed, setRevealed] = useState(false); const maskedKey = apiKey ? `${apiKey.substring(0, 8)}${'•'.repeat(48)}` : ''; const displayKey = revealed ? apiKey : maskedKey; return (