{# Macro modal — diálogo del design system sobre nativo. Uso (declarativo): {% from "core/components/modal.html" import modal %} {% call modal("mi-modal", title="Editar registro") %} ...contenido... {% endcall %} `openModal(id)` / `closeModal(id)` viven en htmx-events.js. El nativo aporta gratis: focus trap, cierre con Escape y ::backdrop (estilado como .dg-dialog en el CSS del paquete). Para CONFIRMACIONES de acciones destructivas no declares un modal: usa `hx-confirm="¿Seguro?"` en el elemento HTMX (el shell lo intercepta y pinta este mismo diálogo), o `dgConfirm(mensaje, opts)` desde JS, que devuelve Promise: const ok = await dgConfirm("¿Borrar este registro?", { danger: true }); if (!ok) return; #} {% macro modal(id, title="", max_width="max-w-lg") %} {%- endmacro %}