// Auswahl beim IFC-Import ([B3]/[B4]): als Kontext-Meshes (Standard, wie bisher) oder als echte // Bauteile (Kern `import_ifc.rs`). Overlay-Muster wie `UnsavedChangesDialog` (kein `window.confirm`). import { useEffect, useState } from "react"; import { t } from "../i18n"; export type IfcImportMode = "mesh" | "elements"; export interface IfcImportDialogProps { fileName: string; onImport: (mode: IfcImportMode) => void; onCancel: () => void; } export function IfcImportDialog({ fileName, onImport, onCancel }: IfcImportDialogProps) { const [mode, setMode] = useState("mesh"); useEffect(() => { const onKey = (e: KeyboardEvent) => { if (e.key === "Escape") onCancel(); }; window.addEventListener("keydown", onKey); return () => window.removeEventListener("keydown", onKey); }, [onCancel]); return (
e.stopPropagation()} >
{t("ifc.importDialog.title")}
{fileName}
{t("ifc.importDialog.asMeshHint")}
{t("ifc.importDialog.asElementsHint")}
); }