import React, { useState } from 'react'; import { Upload } from 'lucide-react'; import type { LucideIcon } from "lucide-react"; interface PgpKeyInputProps { value: string; onChange: (value: string) => void; placeholder: string; label: string; icon?: LucideIcon; } export const PgpKeyInput: React.FC = ({ value, onChange, placeholder, label, icon: Icon }) => { const [isDragging, setIsDragging] = useState(false); const handleDragOver = (e: React.DragEvent) => { e.preventDefault(); setIsDragging(true); }; const handleDragLeave = (e: React.DragEvent) => { e.preventDefault(); setIsDragging(false); }; const handleDrop = (e: React.DragEvent) => { e.preventDefault(); setIsDragging(false); const file = e.dataTransfer.files[0]; if (file) { const reader = new FileReader(); reader.onload = (event) => { if (event.target?.result) { onChange(event.target.result as string); } }; reader.readAsText(file); } }; return (