{{> buildElement categories.charter choices=database.charter category="charter"}}
{{> buildElement categories.heartland choices=database.heartland category="heartland"}}
{{> buildElement categories.government choices=database.government category="government"}}

{{localize "PF2E.Kingmaker.KingdomBuilder.AssignBoostsHeader"}}

{{#each abilityLabels as |ability|}}

{{localize ability}}

{{/each}}
{{> buildRow data=build.charter object=kingdom.charter section="charter" title="PF2E.Kingmaker.Kingdom.BuildElement.Charter" missingText="PF2E.Kingmaker.KingdomBuilder.Missing.Charter" }} {{> buildRow data=build.heartland object=kingdom.heartland section="heartland" title="PF2E.Kingmaker.Kingdom.BuildElement.Heartland" missingText="PF2E.Kingmaker.KingdomBuilder.Missing.Heartland" }} {{> buildRow data=build.government object=kingdom.government section="government" title="PF2E.Kingmaker.Kingdom.BuildElement.Government" missingText="PF2E.Kingmaker.KingdomBuilder.Missing.Government" }}
{{#each build.levelBoosts as |boosts level|}}
{{#if boosts.remaining}}
{{remaining}}
{{/if}}
{{#if (eq boosts.minLevel boosts.level)}} {{localize "PF2E.LevelN" level=level}} {{else}} {{localize "PF2E.LevelRange" minLevel=boosts.minLevel level=boosts.level}} {{/if}}
{{#each boosts.buttons as |state|}} {{> buttons state=state}} {{/each}}
{{/each}}

{{localize "PF2E.Kingmaker.KingdomBuilder.FinalizeHeader"}}

{{#each kingdom.abilities as |ability key|}}
{{#if @root.kingdom.build.manual}} {{else}}
{{ability.value}}
{{/if}}

{{localize (lookup ../abilityLabels key)}}

{{/each}}
{{#*inline "buildElement"}}
{{#each choices as |choice slug|}}
{{/each}}

{{buildEntry.name}} {{#if @root.options.editable}}
{{/if}}

{{buildEntry.description}}
{{/inline}} {{#*inline "buildRow"}}
{{#if data.remaining}}
{{data.remaining}}
{{/if}} {{#if object}} {{/if}}
{{localize title}}
{{#if object}} {{object.name}} {{else}} {{localize "PF2E.Kingmaker.KingdomBuilder.NotSelected"}} {{/if}}
{{#if data.buttons}}
{{#each data.buttons as |state|}} {{> buttons state=state}} {{/each}}
{{else}}
{{localize missingText}}
{{/if}}
{{/inline}} {{#*inline "buttons"}}
{{#if flaw}} {{> boostButton type="flaw" button=state.flaw}} {{/if}} {{#if boost}} {{> boostButton type="boost" button=state.boost}} {{/if}}
{{/inline}} {{#*inline "boostButton"}} {{#if button.second}}
{{> boostButtonSingle button=button type=type number="first"}} {{> boostButtonSingle button=button.second type=type number="second"}}
{{else}} {{> boostButtonSingle button=button type=type}} {{/if}} {{#*inline "boostButtonSingle"}} {{/inline}} {{/inline}}