{% from 'components/memory-search-evidence.html' import search_evidence %}
{% set entries = data.notes %}
{% if selected_note and selected_note.note_key not in entries|map(attribute='note_key')|list %}{% set entries = [selected_note] + entries %}{% endif %}
{% for item in entries %}
{% set expanded = selected_note and selected_note.note_key == item.note_key %}
{% if expanded and selected_note %}{% set item = selected_note %}{% endif %}
{% if expanded %}{% include 'components/note-detail.html' %}{% else %}