{# The lifetime line, defined ONCE and called from four surfaces: the index
card (both lanes), the booth header (both branches) and the marks page.
U4: a booth's lifetime is derived from its own state, and a booth that is
not counting down must always SAY WHY — an invisible rule that silently
stopped the clock would be strictly worse than the `.forever` boolean it
replaces, because that one was at least visible as a lane.
`hold` is the REASON, straight off `hold_reason()`, not a bool beside a
string that can disagree with it. Kept wins over a hold because a kept booth
is exempt either way, and showing two reasons for one EXEMPTION is the
two-representations-of-one-state trap.
Unreadable marks are the exception and ride along even on a kept board:
damaged judgment is not a second exemption, it is a thing somebody has to go
and fix, and the kept lane holds the durable boards — the ones where losing
the operator's marks costs most. #}
{% macro lifetime(kept, hold, expires_in) -%}
{%- if kept -%}
kept{% if hold == "unreadable" %} · marks unreadable{% endif %}
{%- elif hold == "unreadable" -%}
held · marks unreadable
{%- elif hold == "open" -%}
held until answered
{%- else -%}
expires in {{ expires_in|dur }}
{%- endif -%}
{%- endmacro %}