<section class="inventory-list directory-list inventory-pane" data-inventory>
    {{#each inventory.sections as |section|}}
        <header>
            <h3 class="item-name">{{section.label}}</h3>
            {{#if (or @root.inventory.showValueAlways (includes section.types "treasure"))}}
                <span class="price">
                    {{~#if @root.inventory.showUnitBulkPrice~}}
                        {{localize "PF2E.Actor.Inventory.UnitTitle.Price"}}
                    {{~else~}}
                        {{localize "PF2E.ValueLabel"}}
                    {{~/if~}}
                </span>
            {{/if}}
            <span class="quantity">{{localize "PF2E.QuantityLabel"}}</span>
            <span class="bulk">
                {{~#if @root.inventory.showUnitBulkPrice~}}
                    {{localize "PF2E.Actor.Inventory.UnitTitle.Bulk"}}
                {{~else~}}
                    {{localize "PF2E.Item.Physical.Bulk.Label"}}
                {{~/if~}}
            </span>
            {{#if @root.editable}}
                <div class="item-controls">
                    <a
                        data-action="create-item"
                        data-tooltip="PF2E.CreateItemTitle"
                        data-types="{{section.types}}"
                    ><i class="fa-solid fa-fw fa-plus"></i></a>
                    <a
                        data-action="browse-equipment"
                        data-tooltip="PF2E.OpenInventoryBrowser"
                        data-filter="{{section.types}}"
                    ><i class="fa-solid fa-fw fa-search"></i></a>
                </div>
            {{else if (ne @root.actor.type "loot")}}
                <div class="item-controls readonly"></div>
            {{/if}}
        </header>
        <ul class="items" data-item-list data-item-types="{{section.types}}"{{#if @root.isLootSheet}} data-loot{{/if}}>
            {{#each section.items as |rowData|}}
                {{#if (or (not rowData.hidden) @root.document.isOwner)}}
                    {{> "systems/pf2e/templates/actors/partials/item-line.hbs" this=rowData}}
                {{/if}}
            {{/each}}
        </ul>
    {{/each}}
</section>
