import { useEffect, useRef, type ReactNode } from "react"; import { useEscapeLayer } from "../escape"; import { Icon } from "./Icon"; interface ConfirmDialogProps { title: string; message: ReactNode; confirmLabel?: string; onConfirm: () => void; onClose: () => void; } export function ConfirmDialog({ title, message, confirmLabel = "Delete", onConfirm, onClose }: ConfirmDialogProps) { const confirmRef = useRef(null); useEffect(() => { confirmRef.current?.focus(); }, []); useEscapeLayer(true, onClose); return (
e.stopPropagation()}>

{title}

{message}

); }