<form {{#if flat}}data-flat="{{flat}}"{{/if}} autocomplete="off" autocapitalize="off" data-tooltip-class="pf2e">
    <header>
        <input type="search" id="{{options.id}}-search" placeholder="&#xf002;" aria-label="Filter" />
    </header>

    <ul class="{{#if hasCustomChoices}}has-custom{{/if}}{{#if hasRarity}} has-rarity{{/if}}">
        {{#each choices as |choice key|}}
            <li>
                <label class="option">
                    <input type="checkbox" name="{{key}}" {{checked choice.selected}} {{disabled choice.disabled}} />
                    <span>{{choice.label}}</span>
                    {{#if choice.source}}<i class="fa-solid fa-circle-info" data-tooltip="{{choice.source}}" data-tooltip-direction="RIGHT"></i>{{/if}}
                </label>
                {{#if choice.rarity~}}
                    <div class="tags paizo-style">
                        <span class="tag rarity {{choice.rarity.slug}}">{{choice.rarity.label}}</span>
                    </div>
                {{~/if}}
            </li>
        {{/each}}
    </ul>

    <footer>
        {{#if details~}}
            <div class="form-group stacked details">
                <label for="{{options.id}}-details">{{localize "PF2E.Details"}}</label>
                <input
                    type="text"
                    id="{{options.id}}-details"
                    value="{{details.value}}"
                    placeholder="{{localize details.placeholder}}"
                    data-details data-path={{details.path}}
                />
            </div>
        {{~/if}}

        <button type="submit">
            <i class="fa-regular fa-floppy-disk"></i>{{localize "DOCUMENT.Update" type=(localize documentType)}}
        </button>
    </footer>
</form>
