import React, { useState } from 'react'; interface SaveModalProps { ansiOutput: string; onSave: (name: string) => void; onClose: () => void; } export const SaveModal: React.FC = ({ ansiOutput, onSave, onClose }) => { const [name, setName] = useState(''); const [copied, setCopied] = useState(false); const handleSave = () => { if (name.trim()) { onSave(name.trim()); onClose(); } }; const handleCopy = () => { navigator.clipboard.writeText(ansiOutput).then(() => { setCopied(true); setTimeout(() => setCopied(false), 2000); }); }; return (

Save ANSI Art

setName(e.target.value)} onKeyDown={(e) => e.key === 'Enter' && handleSave()} autoFocus style={{ padding: '0.5rem', border: '2px solid var(--regular3)', borderRadius: '4px', backgroundColor: 'var(--background)', color: 'var(--foreground)', fontSize: '1rem', }} />
); };