<div class="traits">
    <div class="form-group">
        <label>{{localize "DND5E.Size"}}</label>
        <select class="actor-size" name="system.traits.size">
            {{#select system.traits.size}}
            {{#each config.actorSizes as |label size|}}
                <option value="{{size}}">{{label}}</option>
            {{/each}}
            {{/select}}
        </select>
    </div>

    {{#unless isVehicle}}
    <div class="form-group">
        <label>{{localize "DND5E.Senses"}}</label>
        <a class="config-button" data-action="senses" data-tooltip="DND5E.SensesConfig">
            <i class="fas fa-cog"></i>
        </a>
        <ul class="traits-list">
        {{#each senses as |v k|}}
            <li class="tag {{k}}">{{v}}</li>
        {{/each}}
        </ul>
    </div>

    <div class="form-group {{traits.traits.languages.cssClass}}">
        <label>{{localize "DND5E.Languages"}}</label>
        <a class="trait-selector" data-trait="languages"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.Languages')}}" tabindex="0">
            <i class="fas fa-edit"></i>
        </a>
        <ul class="traits-list">
        {{#each traits.traits.languages.selected as |v k|}}
            <li class="tag {{k}}">{{v}}</li>
        {{/each}}
        </ul>
    </div>
    {{/unless}}

    <div class="form-group {{traits.traits.di.cssClass}}">
        <label>{{localize "DND5E.DamImm"}}</label>
        <a class="trait-selector" data-trait="di"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.DamImm')}}" tabindex="0">
            <i class="fas fa-edit"></i>
        </a>
        <ul class="traits-list">
        {{#each traits.traits.di.selected as |v k|}}
            <li class="tag {{k}}">{{v}}</li>
        {{/each}}
        </ul>
    </div>

    <div class="form-group {{traits.traits.dr.cssClass}}">
        <label>{{localize "DND5E.DamRes"}}</label>
        <a class="trait-selector" data-trait="dr"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.DamRes')}}" tabindex="0">
            <i class="fas fa-edit"></i>
        </a>
        <ul class="traits-list">
        {{#each traits.traits.dr.selected as |v k|}}
            <li class="tag {{k}}">{{v}}</li>
        {{/each}}
        </ul>
    </div>

    <div class="form-group {{traits.traits.dv.cssClass}}">
        <label>{{localize "DND5E.DamVuln"}}</label>
        <a class="trait-selector" data-trait="dv"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.DamVuln')}}">
            <i class="fas fa-edit"></i>
        </a>
        <ul class="traits-list">
        {{#each traits.traits.dv.selected as |v k|}}
            <li class="tag {{k}}">{{v}}</li>
        {{/each}}
        </ul>
    </div>

    <div class="form-group {{traits.traits.ci.cssClass}}">
        <label>{{localize "DND5E.ConImm"}}</label>
        <a class="trait-selector" data-trait="ci"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.ConImm')}}">
            <i class="fas fa-edit"></i>
        </a>
        <ul class="traits-list">
        {{#each traits.traits.ci.selected as |v k|}}
            <li class="tag {{k}}">{{v}}</li>
        {{/each}}
        </ul>
    </div>

    {{#if isCharacter}}
    <div class="form-group {{traits.traits.weaponProf.cssClass}}">
        <label>{{localize "DND5E.TraitWeaponProf"}}</label>
        <a class="trait-selector" data-trait="weapon"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.TraitWeaponProf')}}">
            <i class="fas fa-edit"></i>
        </a>
        <ul class="traits-list">
        {{#each traits.traits.weaponProf.selected as |v k|}}
            <li class="tag {{k}}">{{v}}</li>
        {{/each}}
        </ul>
    </div>

    <div class="form-group {{traits.traits.armorProf.cssClass}}">
        <label>{{localize "DND5E.TraitArmorProf"}}</label>
        <a class="trait-selector" data-trait="armor"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.TraitArmorProf')}}">
            <i class="fas fa-edit"></i>
        </a>
        <ul class="traits-list">
        {{#each traits.traits.armorProf.selected as |v k|}}
            <li class="tag {{k}}">{{v}}</li>
        {{/each}}
        </ul>
    </div>

    <div class="form-group {{traits.traits.toolProf.cssClass}}">
        <label>{{localize "DND5E.TraitToolProf"}}</label>
        <a class="trait-selector" data-trait="tool"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.TraitToolProf')}}">
            <i class="fas fa-edit"></i>
        </a>
        <ul class="traits-list">
        {{#each tools}}
            <li class="tag tool proficiency-row" data-property="tools" data-key="{{@key}}">
                <input type="hidden" name="system.tools.{{@key}}.value" value="{{baseValue}}" data-dtype="Number">
                <input type="hidden" name="system.tools.{{@key}}.ability" value="{{ability}}">
                <a class="proficiency-toggle tool-proficiency" data-tooltip="{{hover}}">{{{icon}}}</a>
                <h4 class="tool-name rollable">{{label}}</h4>
                <a class="config-button" data-action="tool" data-tooltip="DND5E.ToolConfigure">
                    <i class="fas fa-cog"></i>
                </a>
            </li>
        {{/each}}
        </ul>
    </div>
    {{/if}}

    {{#unless isVehicle}}
    <div class="form-group ">
        <label>{{localize "DND5E.SpecialTraits"}}</label>
        <a class="config-button" data-action="flags"
           data-tooltip="{{localize 'DND5E.TraitConfig' trait=(localize 'DND5E.SpecialTraits')}}">
            <i class="fas fa-cog"></i>
        </a>
    </div>
    {{/unless}}
</div>
