<section class="tab pfs major" data-group="primary" data-tab="pfs">
    <section class="organized-play">
            <label class="player-number details-label" for="{{options.id}}-pfs-player-number">{{localize "PF2E.PFS.OrganizedPlayNumber"}}</label>
            <label class="character-number details-label" for="{{options.id}}-pfs-character-number">{{localize "PF2E.PFS.CharacterNumber"}}</label>

            <input type="number" class="player-number details-input" id="{{options.id}}-pfs-player-number" name="system.pfs.playerNumber" value="{{data.pfs.playerNumber}}" min="10000" max="99999" placeholder="10000" />
            <span class="dash">&ndash;</span>
            <input type="number" class="character-number details-input" id="{{options.id}}-pfs-character-number" name="system.pfs.characterNumber" value="{{data.pfs.characterNumber}}" min="2001" max="9999" placeholder="2001" />
    </section>
    <section class="level-bump">
        <label class="details-label" for="{{options.id}}-pfs-level-bump">{{localize "PF2E.PFS.LevelBump"}}</label>
        <div class="toggle{{#if data.pfs.levelBump}} enabled{{/if}}">
            <input class="details-input" id="{{options.id}}-pfs-level-bump" name="system.pfs.levelBump" type="checkbox" {{checked data.pfs.levelBump}} />
            <label for="{{options.id}}-pfs-level-bump"></label>
        </div>
    </section>
    <section class="faction">
        <label class="details-label" for="{{options.id}}-pfs-current-faction">{{localize "PF2E.PFS.CurrentFaction"}}</label>
        <select id="{{options.id}}-pfs-current-faction" name="system.pfs.currentFaction">
            {{selectOptions pfsFactions selected=data.pfs.currentFaction localize=true}}
        </select>
    </section>
    <section class="reputations">
        <span class="details-label">{{localize "PF2E.PFS.Reputation"}}</span>
        {{#each data.pfs.reputation as |rep faction|}}
            <div class="reputation">
                <label for="{{@root.options.id}}-pfs-rep-{{faction}}">{{localize (concat "PF2E.PFS.Factions." faction)}}:</label>
                <input type="number" class="details-input small-input" id="{{@root.options.id}}-pfs-rep-{{faction}}" name="system.pfs.reputation.{{faction}}" value="{{rep}}" placeholder="0" />
            </div>
        {{/each}}
        </div>
    </section>

    <header data-group-id="pfs">
        {{localize "PF2E.FeatPFSBoonHeader"}}
        <button type="button" data-action="browse-feats" data-type="feat"><i class="fa-solid fa-fw fa-search"></i>{{localize "PF2E.BrowseLabel"}}</button>
    </header>

    <ol class="actions-list directory-list">
        {{#each document.pfsBoons as |feat|}}
            <li class="item feat-item" data-item-id="{{feat.id}}">
                <div class="item-name">
                    <a class="item-image framed" data-action="item-to-chat">
                        <img src="{{feat.img}}" />
                        <i class="fa-solid fa-message"></i>
                    </a>
                    <h4>{{feat.name}}</h4>
                </div>
                {{#if @root.editable}}
                    <div class="item-controls">
                        <a data-action="edit-item" data-tooltip="PF2E.EditItemTitle"><i class="fa-solid fa-fw fa-edit"></i></a>
                        <a data-action="delete-item" data-tooltip="PF2E.DeleteItemTitle"><i class="fa-solid fa-fw fa-trash"></i></a>
                    </div>
                {{/if}}
            </li>
        {{/each}}
    </ol>
</section>
