<div class="content">
    <section class="feat-section major" data-group-id="{{section.id}}">
        <header>
            {{localize "PF2E.Kingmaker.Kingdom.BuildHeader"}}
            <button type="button" data-action="builder">
                <i class="fa-solid fa-fw fa-crown"></i>{{localize "PF2E.Kingmaker.KingdomBuilder.Builder"}}
            </button>
        </header>
        <ol class="directory-list">
            {{#if kingdom.build.charter}}
                {{> kingdomCHG letter="C" item=kingdom.build.charter type="charter"}}
            {{/if}}
            {{#if kingdom.build.heartland}}
                {{> kingdomCHG letter="H" item=kingdom.build.heartland type="heartland"}}
            {{/if}}
            {{#if kingdom.build.government}}
                {{> kingdomCHG letter="G" item=kingdom.build.government type="government"}}
            {{/if}}
        </ol>
    </section>

    {{#each feats as |section|}}
        <section class="feat-section major" data-group-id="{{section.id}}">
            <header>
                {{localize section.label}}
                {{#if section.featFilter}}
                    <button type="button" data-action="browse-feats">
                        <i class="fa-solid fa-fw fa-search"></i>{{localize "PF2E.BrowseLabel"}}
                    </button>
                {{/if}}
            </header>
            <ol class="actions-list directory-list" data-foundry-list>
                {{#each section.feats as |featSlot|}}
                    {{> "systems/pf2e/templates/actors/character/partials/feat-slot.hbs" featSlot=featSlot featFilter=section.featFilter}}
                {{/each}}
            </ol>
        </section>
    {{/each}}
</div>

{{#*inline "kingdomCHG"}}
    <li class="item feat-item expandable" data-item-summary-id="kingdom-{{letter}}">
        <div class="item-name">
            <div class="feat-slot-title">{{letter}}</div>
            <div class="item-image framed">
                <img class="item-icon" src="{{item.img}}" alt="{{item.name}}">
                <i class="fa-solid fa-message"></i>
            </div>
            <h4><a data-action="toggle-summary">{{item.name}}</a></h4>
        </div>
        <div class="item-controls">
            {{#if @root.editable}}
                <a class="item-control item-edit" data-action="builder" data-tab="{{type}}" title="{{localize "PF2E.EditItemTitle"}}"><i class="fa-solid fa-fw fa-edit"></i></a>
            {{/if}}
        </div>
        <div class="item-summary" hidden="hidden">
            {{{item.description}}}
            {{> "systems/pf2e/templates/actors/party/kingdom/partials/build-entry-boosts.hbs" buildEntry=item}}
        </div>
    </li>
{{/inline}}
