{{#unless (eq cardView 'card') }}
{{#if (or (eq type 'domainCard') (eq type 'armor') (eq type 'consumable') (eq type 'miscellaneous') (eq type 'weapon'))}}
{{#each document.items as |item|}}
{{#if (eq item.type ../type)}}
{{#unless (and (eq ../type 'domainCard') (or (and item.system.inVault (not ../isVault)) (and (not item.system.inVault) ../isVault)))}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=../type}}
{{/unless}}
{{/if}}
{{/each}}
{{else}}
{{#if (eq type 'effect')}}
{{#each document.effects as |effect|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=effect type=../type}}
{{/each}}
{{else}}
{{#each values}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=this type=../type hideControls=../hideControls featureType=true }}
{{/each}}
{{#each adversaries as |adversary|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary type='adversary' hideControls=true isActor=true categoryAdversary=@../key}}
{{/each}}
{{/if}}
{{/if}}
{{/unless}}
{{#if (and (eq cardView 'card') (eq type 'domainCard'))}}
{{#if isVault}}
{{#each document.system.domainCards.vault as |card|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs' item=card type=../type}}
{{/each}}
{{else}}
{{#each document.system.domainCards.loadout as |card|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs' item=card type=../type}}
{{/each}}
{{/if}}
{{/if}}