import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { AlertCircle, CheckCircle2, Eye, EyeOff, Loader2, Zap } from 'lucide-react'; import type { ProviderConfig } from '@/config/api-providers'; interface ApiKeyFieldProps { config: ProviderConfig; } export function ApiKeyField({ config }: ApiKeyFieldProps) { const { label, inputId, placeholder, value, setValue, showValue, setShowValue, hasStoredKey, inputTestId, toggleTestId, testButton, result, resultTestId, resultMessageTestId, descriptionPrefix, descriptionLinkHref, descriptionLinkText, descriptionSuffix, } = config; return (
{descriptionPrefix}{' '} {descriptionLinkText} {descriptionSuffix}
{result && (