{{#with entry as |entry|}}
    {{!-- Add section for each level --}} {{#each entry.levels as |section|}} {{#if (or (gt section.active.length 0) entry.showSlotlessLevels)}}
  1. {{localize section.label}}

    {{#if (and section.isCantrip (not section.uses))}} / {{else if (and entry.isFocusPool (not (eq @root.actor.type "character")))}}
    /
    {{else if (and section.uses (not entry.isFocusPool))}} {{#if section.uses.value includeZero=true}} / {{/if}} {{#if section.uses.value includeZero=true}} {{#if @root.options.editable}} {{/if}} {{/if}} {{/if}}
    {{#if entry.isInnate}} {{localize "PF2E.SpellUsesLabel"}} {{else}} {{localize "PF2E.SpellRangeLabel"}} {{/if}}
    {{#if @root.options.editable}}
    {{#unless entry.isPrepared}} {{/unless}}
    {{/if}}
  2. {{!-- Add spell items for each spell level --}} {{#each section.active as |active i|}} {{#with active}}
  3. {{spell.name}}

    {{spell.name}} {{{actionGlyph spell.system.time.value}}}

    {{!-- Innate spells replace range for uses --}} {{#if (not entry.isInnate)}} {{spell.system.range.value}} {{else if uses}}
    / {{#if @root.options.editable}} {{/if}}
    {{else}} {{localize "PF2E.SpellUnlimitedLabel"}} {{/if}}
    {{#if @root.options.editable}}
    {{#if entry.isPrepared}} {{#unless section.isCantrip}} {{/unless}} {{else}} {{#if (and entry.isSpontaneous (not section.isCantrip))}} {{#if signature}}{{else}}{{/if}} {{/if}} {{#unless virtual}} {{/unless}} {{/if}}
    {{/if}}
  4. {{else}}
  5. {{localize "PF2E.SpellSlotEmpty"}}

  6. {{/with}} {{/each}} {{/if}} {{/each}} {{#if (and (eq entry.levels.length 0) @root.editable)}}
  7. {{localize "PF2E.SpellSlotEmpty"}}

  8. {{/if}}
{{/with}}