{# The Apply action button, rendered as a reversible toggle. Expects
`draft` and `apply_queued` (bool). When already queued it shows
"Applied" and a second click reverts (un-queues) the apply. Targets
itself (outerHTML) so the endpoint can swap it between states.
In read-only mode (no API key) there is no apply action — a disabled
"Read-only" pill stands in its place. #}
{% if not reply_mode() %}
Read-only
{% elif apply_queued %}
{% elif draft.product or draft.component %}
{% elif draft.resolution %}
{% else %}
{% endif %}