<section
    class='tab {{tabs.details.cssClass}} {{tabs.details.id}}'
    data-tab='{{tabs.details.id}}'
    data-group='{{tabs.details.group}}'
>
    <fieldset class="one-column">
        <legend>{{localize 'DAGGERHEART.GENERAL.Trait.plural'}}</legend>

        <div class="nest-inputs">
            <div class="traits-inner-container">
                {{#each document._source.system.traits as | trait key |}}
                    <div class="trait-container">
                        <span>{{localize (concat "DAGGERHEART.CONFIG.Traits." key ".name" )}}</span>
                        <input type="text" data-dtype="Number" name="{{concat "system.traits." key ".value"}}" value="{{trait.value}}" />
                    </div>
                {{/each}}
            </div>
        </div>
    </fieldset>

    <fieldset class="one-column">
        <legend>{{localize 'DAGGERHEART.GENERAL.basics'}}</legend>

        <div class="two-columns even">
            {{#each resources as |resource|}}
                <span {{#if resource.tooltip}}data-tooltip-text="{{resource.tooltip}}"{{/if}}>
                    {{formGroup resource.field value=resource.value name=resource.name}}
                </span>
            {{/each}}

            {{formGroup systemFields.scars value=document._source.system.scars localize=true}}

            {{formGroup systemFields.proficiency value=document._source.system.proficiency localize=true}}
            <span data-tooltip-text="{{localize "DAGGERHEART.UI.Tooltip.maxEvasionClassBound"}}">
                {{formGroup systemFields.evasion value=document._source.system.evasion label="DAGGERHEART.ACTORS.Character.maxEvasionBonus" localize=true}}
            </span>
        </div>
    </fieldset>
</section>
