{# Confirm action panel — v0.61.72 (#6, AegisMark UX patterns roadmap). Irreversible-action consent primitive. Renders the canonical "Final authorisation" shape from AegisMark's SIMS-sync-opt-in prototype: a checklist of obligations the actor must affirm before the primary commit action becomes available, plus an optional secondary draft action and a revoke action shown only in the live state. The panel reads `state_value` (resolved at request time from the entity field named by `state_field`) and branches its visual mode: - off / pending / draft → checklist + primary commit + secondary draft - live / active / on → "Currently live" summary + revoke - revoked / disabled → audit + (optional) re-enable - empty / unknown → assume off (safest default) Card safety: region emits zero chrome + zero title. The dashboard slot owns both via region_card. Tone tints are NOT used here — this panel's emphasis comes from the dual-button asymmetry, not from a band tint. The audit footer auto-renders when the source entity has an `audit:` block declared (audit_enabled=true upstream). Authors don't need to write the disclosure copy by hand. v0.62 CSS refactor: inline Tailwind → semantic .dz-confirm-* classes (components/regions.css). Summary tone driven by `data-dz-confirm-tone="success|muted"` attribute selector; primary button disabled state via `is-disabled` class (Alpine :class is now a one-token swap rather than two parallel branch class strings). #} {% from 'macros/region_wrapper.html' import region_card %} {% call region_card(title) %}
{% set _state = (state_value | default('off') or 'off') | lower %} {% set _is_live = _state in ('live', 'active', 'on', 'enabled') %} {% set _is_revoked = _state in ('revoked', 'disabled', 'off-revoked') %} {% if _is_live %} {# ── Live state: summary + revoke action ────────────────────── #}
Currently live.
Action recorded; further changes require a new authorisation.
{% if revoke_url %}
Revoke
{% endif %} {% elif _is_revoked %} {# ── Revoked state: audit + (optional) re-enable ──────────────── #}
Authorisation revoked.
Re-authorise to enable the integration again.
{% if primary_action_url %}
Re-enable
{% endif %} {% else %} {# ── Off / pending / draft: checklist + dual button ────────────── #} {% if confirmations and confirmations | length > 0 %} {% else %} {# No confirmations declared — show the dual button alone, primary enabled (no gate to satisfy). Useful for low-friction flows. #}
{% if secondary_action_url %} Save as draft {% endif %} {% if primary_action_url %} Confirm {% endif %}
{% endif %} {% endif %} {# ── Audit footer (auto-detected from entity.audit) ────────────── #} {% if audit_enabled %}

This action is recorded in the audit log with your account, IP address, and timestamp.

{% endif %}
{% endcall %}