<h2>{{ localize 'CoC7.Possessions'}}</h2>
<div class="inventory flexrow-coc7">
  <div class="flex3">
    {{#unless hasInventory}}
      <h3 class="warning">{{localize 'CoC7.InventoryIsCurrentlyEmpty'}}</h3>
    {{else}}
      {{#if showInventoryItems}}
        <div class="section-header flexrow-coc7">
          <h3>{{localize 'CoC7.Items'}}</h3>
          {{#unless data.system.flags.locked}}
            <div class="header-buttons">
              <a class="add-item" data-type="item" title='{{localize "CoC7.AddItem"}}'><i class="fas fa-plus"></i></a>
            </div>
          {{/unless}}
        </div>
        <ol class="item-list">
          {{#each itemsByType.item as |item id|}}
            <li class="item flexrow-coc7" data-item-id="{{item._id}}">
              <div class="item-image" style="background-image: url({{item.img}})"></div>
              <h4 class="item-name show-detail">{{system.quantity}} x {{item.name}}</h4>
              <div class="item-controls">
                <a class="item-control item-trade" title="{{localize 'CoC7.TradeItem'}}"><i class="game-icon game-icon-trade"></i></a>
                <a class="item-control item-edit" title="{{localize 'CoC7.EditItem'}}"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" title="{{localize 'CoC7.DeleteItem'}}"><i class="fas fa-trash"></i></a>
              </div>
            </li>
          {{/each}}
        </ol>
      {{/if}}
      {{#if showInventoryBooks}}
        <div class="section-header flexrow-coc7">
          <h3>{{localize 'CoC7.Books'}}</h3>
          {{#unless data.system.flags.locked}}
            <div class="header-buttons">
              <a class="add-item" data-type="book" title='{{localize "CoC7.AddBook"}}'><i class="fas fa-plus"></i></a>
            </div>
          {{/unless}}
        </div>
        <ol class="item-list">
          {{#each itemsByType.book as |item id|}}
            <li class="item flexrow-coc7" data-item-id="{{item._id}}">
              <div class="item-image" style="background-image: url({{item.img}})"></div>
              <h4 class="item-name show-detail">{{item.name}}</h4>
              <div class="item-controls">
                <a class="item-control item-trade" title="{{localize 'CoC7.TradeItem'}}"><i class="game-icon game-icon-trade"></i></a>
                <a class="item-control item-edit" title="{{localize 'CoC7.EditItem'}}"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" title="{{localize 'CoC7.DeleteItem'}}"><i class="fas fa-trash"></i></a>
              </div>
            </li>
          {{/each}}
        </ol>
      {{/if}}
      {{#if showInventorySpells}}
        <div class="section-header flexrow-coc7">
          <h3>{{localize 'CoC7.Spells'}}</h3>
          {{#unless data.system.flags.locked}}
            <div class="header-buttons">
              <a class="add-item" data-type="spell" title='{{localize "CoC7.AddSpell"}}'><i class="fas fa-plus"></i></a>
            </div>
          {{/unless}}
        </div>
        <ol class="item-list">
          {{#each itemsByType.spell as |item id|}}
            <li class="item flexrow-coc7" data-item-id="{{item._id}}">
              <div class="item-image" style="background-image: url({{item.img}})"></div>
              <h4 class="item-name show-detail">{{item.name}}</h4>
              <div class="item-controls">
                <a class="item-control item-trade" title="{{localize 'CoC7.TradeItem'}}"><i class="game-icon game-icon-trade"></i></a>
                <a class="item-control item-edit" title="{{localize 'CoC7.EditItem'}}"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" title="{{localize 'CoC7.DeleteItem'}}"><i class="fas fa-trash"></i></a>
              </div>
            </li>
          {{/each}}
        </ol>
      {{/if}}
      {{#if showInventoryTalents}}
        <div class="section-header flexrow-coc7">
          <h3>{{localize 'CoC7.PulpTalents'}}</h3>
        </div>
        <ol class="item-list">
          {{#each itemsByType.talent as |item id|}}
            <li class="item flexrow-coc7" data-item-id="{{item._id}}">
              <div class="item-image" style="background-image: url({{item.img}})"></div>
              <h4 class="item-name show-detail">{{item.name}}</h4>
              <div class="item-controls">
                <a class="item-control item-edit" title="{{localize 'CoC7.EditItem'}}"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" title="{{localize 'CoC7.DeleteItem'}}"><i class="fas fa-trash"></i></a>
              </div>
            </li>
          {{/each}}
        </ol>
      {{/if}}
      {{#if showInventoryWeapons}}
        <div class="section-header flexrow-coc7">
          <h3>{{localize 'CoC7.Weapons'}}</h3>
          {{#unless data.system.flags.locked}}
            <div class="header-buttons">
              <a class="add-item" data-type="weapon" title='{{localize "CoC7.AddWeapon"}}'><i class="fas fa-plus"></i></a>
            </div>
          {{/unless}}
        </div>
        <ol class="item-list">
          {{#each itemsByType.weapon as |item id|}}
            <li class="item flexrow-coc7" data-item-id="{{item._id}}">
              <div class="item-image" style="background-image: url({{item.img}})"></div>
              <h4 class="item-name show-detail">{{item.name}}</h4>
              <div class="item-controls">
                <a class="item-control item-trade" title="{{localize 'CoC7.TradeItem'}}"><i class="game-icon game-icon-trade"></i></a>
                <a class="item-control item-edit" title="{{localize 'CoC7.EditItem'}}"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" title="{{localize 'CoC7.DeleteItem'}}"><i class="fas fa-trash"></i></a>
              </div>
            </li>
          {{/each}}
        </ol>
      {{/if}}
      {{#if showInventoryArmor}}
        <div class="section-header flexrow-coc7">
          <h3>{{localize 'CoC7.Armor'}}</h3>
          {{#unless data.system.flags.locked}}
            <div class="header-buttons">
              <a class="add-item" data-type="armor" title='{{localize "CoC7.AddArmor"}}'><i class="fas fa-plus"></i></a>
            </div>
          {{/unless}}
        </div>
        <ol class="item-list">
          {{#each itemsByType.armor as |item id|}}
            <li class="item flexrow-coc7" data-item-id="{{item._id}}">
              <div class="item-image" style="background-image: url({{item.img}})"></div>
              <h4 class="item-name show-detail">{{item.name}}</h4>
              <div class="item-controls">
                <a class="item-control item-trade" title="{{localize 'CoC7.TradeItem'}}"><i class="game-icon game-icon-trade"></i></a>
                <a class="item-control item-edit" title="{{localize 'CoC7.EditItem'}}"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" title="{{localize 'CoC7.DeleteItem'}}"><i class="fas fa-trash"></i></a>
              </div>
            </li>
          {{/each}}
        </ol>
      {{/if}}
      {{#if showInventoryStatuses}}
        <div class="section-header flexrow-coc7">
          <h3>{{localize 'CoC7.Status'}}</h3>
        </div>
        <ol class="item-list">
          {{#each itemsByType.status as |item id|}}
            <li class="item flexrow-coc7" data-item-id="{{item._id}}">
              <div class="item-image" style="background-image: url({{item.img}})"></div>
              <h4 class="item-name show-detail">{{item.name}}</h4>
              <div class="item-controls">
                {{#if ../isKeeper}}
                  <a class="item-control item-edit" title="{{localize 'CoC7.EditItem'}}"><i class="fas fa-edit"></i></a>
                  <a class="item-control item-delete" title="{{localize 'CoC7.DeleteItem'}}"><i class="fas fa-trash"></i></a>
                {{/if}}
              </div>
            </li>
          {{/each}}
        </ol>
      {{/if}}
    {{/unless}}
  </div>
  <div class="flex2 cash">
    {{#unless data.system.flags.locked}}
      <div class="flexrow-coc7 cash-row">
        {{#if data.system.flags.manualCredit}}
          <label>{{localize 'CoC7.ManualCreditValues'}}</label>
          <div class='flex1'></div>
        {{/if}}
        <div class="flag {{#if data.system.flags.manualCredit}}auto-off{{else}}auto-on{{/if}}" data-flag="manualCredit" title="{{localize 'CoC7.AutoCreditValues'}}" style="flex: 0;margin-right: 5px;">
          <i class="fas fa-cogs" style="padding-top: 4px;"></i>
        </div>
      </div>
    {{/unless}}
    <div class="flexrow-coc7 cash-row">
      <label>{{localize 'CoC7.MonetarySpendingLevel'}}</label>
      {{#if data.system.flags.manualCredit}}
        <input type="text" name="system.monetary.spendingLevel" value="{{data.system.monetary.spendingLevel}}">
      {{else}}
        <span>{{monetary.spendingLevel}}</span>
      {{/if}}
    </div>
    <div class="flexrow-coc7 cash-row">
      <label>{{localize 'CoC7.MonetaryCash'}}</label>
      {{#if data.system.flags.manualCredit}}
        <input type="text" name="system.monetary.cash" value="{{data.system.monetary.cash}}">
      {{else}}
        <span>{{monetary.cash}}</span>
      {{/if}}
    </div>
    <div class="flexrow-coc7 cash-row">
      <label>{{localize 'CoC7.MonetarySpent'}}</label><input type="text" name="system.monetary.spent" value="{{data.system.monetary.spent}}">
    </div>
    <div class="flexrow-coc7  cash-row">
      <label>{{localize 'CoC7.MonetaryAssets'}}</label>
      {{#if data.system.flags.manualCredit}}
        <input type="text" name="system.monetary.assets" value="{{data.system.monetary.assets}}">
      {{else}}
        <span style="line-height: 22px;">{{monetary.assets}}</span>
      {{/if}}
    </div>
    <div style="flex:none">
      <textarea name="system.monetary.assetsDetails" placeholder="{{localize 'CoC7.MonetaryAssetsDetails'}}" rows="4">{{data.system.monetary.assetsDetails}}</textarea>
    </div>
    <label style="flex: initial;">{{localize 'CoC7.PossessionsNotes'}}</label>
    <div class="flex1">
      <textarea name="system.notes" placeholder="{{localize 'CoC7.PossessionsNotesHolder'}}">{{data.system.notes}}</textarea>
    </div>
  </div>
</div>