{{#each data.boosts as |boost idx|}}
    <div class="form-group form-group-trait">
        <label class="pf-title">
            {{localize "PF2E.AbilityBoost"}}
            <a
                class="tag-selector"
                data-tag-selector="basic"
                data-title="PF2E.AbilityBoost"
                data-config-types="abilities"
                data-property="system.boosts.{{idx}}"
                data-no-custom="true"
            ><i class="fa-solid fa-edit"></i></a>
        </label>

        <ul class="abc-traits-list">
            {{#each (lookup ../selectedBoosts idx) as |v k|}}
                <span class="tag-legacy {{k}}">{{localize v}}</span>
            {{/each}}
        </ul>
    </div>
{{/each}}

<div class="form-group form-group-trait">
    <label class="pf-title">
        {{localize "PF2E.TrainedSkillsLabel"}}
        <a class="tag-selector" data-tag-selector="basic" data-title="PF2E.TrainedSkillsLabel" data-config-types="skills" data-property="system.trainedSkills"><i class="fa-solid fa-edit"></i></a>
    </label>

    <ul class="abc-traits-list">
        {{#each trainedSkills}}
            {{#if this.selected}}
                <span class="tag-legacy {{@key}}">{{localize this.label}}</span>
            {{/if}}
        {{/each}}
    </ul>
</div>

<div class="form-group">
    <label>
        {{localize "PF2E.Lore"}}
        <a class="small-button" data-action="add-lore">
            <i class="fa-solid fa-plus"></i>{{localize "PF2E.Item.ABC.Add"}}
        </a>
    </label>
    <div>
        {{#if data.trainedSkills.lore}}
            <ol class="lore-list">
                {{#each data.trainedSkills.lore as |lore index|}}
                    <li>
                        <input type="text" name="system.trainedSkills.lore.{{index}}" value="{{lore}}" data-dtype="String" />
                        <a
                            data-action="delete-lore"
                            data-tooltip="Delete"
                            data-index="{{index}}"
                        ><i class="fa-solid fa-trash"></i></a>
                    </li>
                {{/each}}
            </ol>
        {{else}}
            {{localize "None"}}
        {{/if}}
    </div>

</div>

{{~#*inline "abcItems"~}}
    <ul class="item-refs {{#unless data.items}}empty{{/unless}}">
        {{~#each items as |item i|}}
            <li data-index="{{i}}" data-item-uuid="{{item.uuid}}">
                <img src="{{item.img}}">
                <a class="name">{{item.name}}{{#if item.fromWorld}}<i class="fa-solid fa-globe" data-tooltip="PF2E.BackgroundSkillFeats"></i>{{/if}}</a>
                <input value="{{item.uuid}}" name="{{@partial-block}}items.{{i}}.uuid" type="hidden" data-dtype="String">
                <input value="{{item.name}}" name="{{@partial-block}}items.{{i}}.name" type="hidden" data-dtype="String">
                <a class="remove" data-action="remove"><i class="fa-solid fa-xmark"></i></a>
                {{#if item.items~}}
                    {{#> abcItems item}}{{@partial-block}}items.{{i}}.{{/abcItems}}
                {{~/if}}
            </li>
        {{/each~}}
    </ul>
{{~/inline~}}

<div class="form-group item-ref-group" data-valid-drops="skill">
    <label for="data.traits">
        {{localize "PF2E.BackgroundSkillFeats"}}
    </label>
    {{#> abcItems data}}data.{{/abcItems}}
    <p class="hint">
        {{localize "PF2E.DragDropFeats"}}
    </p>
</div>
