{{define "toast"}} {{/* Global toast notifications. Two trigger paths: 1. htmx:responseError — fires on any 4xx/5xx HTMX response. We grab the response body (already a plain-text human message) and show it as an error toast. 2. rm:toast — custom DOM event the server can fire from any handler by setting the HX-Trigger header to: HX-Trigger: {"rm:toast":{"level":"info","message":"…"}} Levels: error|warn|info|success. Toasts auto-dismiss after 5s; click to dismiss early. */}}
{{end}}