<section data-tab="buildings" data-group="{{tab.group}}" class="tab {{tab.cssClass}}">
  <p class="settlement-hint">{{localize "OATHHAMMER.Settlement.BuildingHint"}}</p>

  {{#if buildings.length}}
  <ul class="item-list item-list--buildings">
    <li class="item-list-header">
      <span></span>
      <span class="col-name">{{localize "OATHHAMMER.Label.Name"}}</span>
      <span>{{localize "OATHHAMMER.Label.Built"}}</span>
      <span>{{localize "OATHHAMMER.Label.TaxRevenue"}}</span>
      <span>{{localize "OATHHAMMER.Label.Cost"}}</span>
      <span></span>
    </li>
    {{#each buildings as |building|}}
    <li class="item-entry {{#if building.system.constructed}}building-constructed{{/if}}" data-item-id="{{building.id}}" data-item-uuid="{{building.uuid}}">
      <img src="{{building.img}}" class="item-img" />
      <span class="item-name" data-tooltip="{{building.name}}">{{building.name}}</span>
      <span class="item-constructed">
        {{#unless ../isPlayMode}}
        <a data-action="toggleConstructed" data-item-id="{{building.id}}" class="construct-toggle">
          <i class="fa-{{#if building.system.constructed}}solid{{else}}regular{{/if}} fa-square-check"></i>
        </a>
        {{else}}
        <i class="fa-{{#if building.system.constructed}}solid{{else}}regular{{/if}} fa-square-check"></i>
        {{/unless}}
      </span>
      <span class="item-tax {{#unless building.system.constructed}}item-tax--inactive{{/unless}}">
        {{#if building.system.taxRevenue}}{{building.system.taxRevenue}}{{else}}—{{/if}}
      </span>
      <span class="item-cost">{{building.system.cost}} gp</span>
      <div class="item-actions">
        <a data-action="edit" data-item-id="{{building.id}}" data-item-uuid="{{building.uuid}}"><i class="fa-solid fa-edit"></i></a>
        {{#unless ../isPlayMode}}<a data-action="delete" data-item-id="{{building.id}}" data-item-uuid="{{building.uuid}}"><i class="fa-solid fa-trash"></i></a>{{/unless}}
      </div>
    </li>
    {{/each}}
  </ul>
  {{else}}
  <p class="no-items">{{localize "OATHHAMMER.Settlement.NoBuildings"}}</p>
  {{/if}}
</section>
