Alert Dialog
Modal that asks the user to confirm a destructive or irreversible action. role=alertdialog with the description announced, initial focus on Cancel, and clicking outside does not count as an answer. ConfirmAttrs takes hx-delete and similar attributes.
Delete with confirmation
Focus starts on Cancel. Clicking outside does not close it: only the two answers or Escape do.
Delete the protocol?
Its steps and results go with it. This cannot be undone.
Discard your changes?
What you edited in this protocol will be lost.
@components.AlertDialog(components.AlertDialogProps{
ID: "delete", Title: "Delete the protocol?", Description: "This cannot be undone.",
ConfirmLabel: "Delete", ConfirmAttrs: templ.Attributes{"hx-delete": "/protocols/1"},
})