{{#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}}
    {{localize "PF2E.SpellComponentsLabel"}}
    {{#if (and (not entry.isPrepared) @root.options.editable)}}
    {{/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 spell.system.components.focus}} {{localize "PF2E.SpellComponentShortF"}} {{/if}} {{#if spell.system.components.material}} {{localize "PF2E.SpellComponentShortM"}} {{/if}} {{#if spell.system.components.somatic}} {{localize "PF2E.SpellComponentShortS"}} {{/if}} {{#if spell.system.components.verbal}} {{localize "PF2E.SpellComponentShortV"}} {{/if}}
    {{#if @root.options.editable}} {{#unless (and entry.isFlexible (not section.isCantrip))}}
    {{#if entry.isPrepared}} {{#unless section.isCantrip}} {{/unless}} {{else}} {{#if (and entry.isSpontaneous (not section.isCantrip))}} {{#if signature}}{{else}}{{/if}} {{/if}} {{#unless virtual}} {{/unless}} {{/if}}
    {{/unless}} {{/if}}
  4. {{else}}
  5. {{localize "PF2E.SpellSlotEmpty"}}

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

    {{localize "PF2E.AddSpellTitle"}} {{localize "PF2E.OpenSpellBrowserTitle"}}
  8. {{/if}}
{{/with}}