{# Head of a modal or of the planner's panel: what is open and, for the panel, whether the last change was saved. Sent alone (out of band) after a change that saves by itself. #} {% macro state(value) %}{{ value }}{% endmacro %}

{% if item %}{{ state(item.state) }} {{ kind }} {{ item.item }} {% elif note %}{{ note.type }} Note #{{ note.id }} {% elif kind == "note" %}New note {% else %} New {{ kind }}{% endif %}

{% if item or note %} {% if error %}Not saved: {{ error }}{% elif saved %}Saved {{ saved }}{% endif %} {% endif %} {% if not panel %}{% endif %}