import { useState } from 'react'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Switch } from '@/components/ui/switch'; import { Label } from '@/components/ui/label'; interface Props { pending: { text: string; filename: string } | null; onChoose: (mode: 'quick' | 'options', remember: boolean) => void; onCancel: () => void; } /** * Shown on drag-and-drop so a stray drop never silently rewrites the program. * The "don't ask again" switch pins a preference in localStorage. */ export default function ImportChooser({ pending, onChoose, onCancel }: Props) { const [remember, setRemember] = useState(false); const open = pending !== null; return ( !o && onCancel()}> Import {pending?.filename ?? 'SVG'} Convert immediately, or open the staging workspace to assign a stitch strategy per element first. ); }