<section class="attributes-tab">
    <section class="flexrow">
        <ul class="attributes flexrow">
            <li class="attribute health">
                <h4 class="attribute-name box-title" title="{{localize 'ACKS.Health'}}">{{ localize "ACKS.HealthShort" }}
                    <a class="hp-roll"><i class="fas fa-dice"></i></a></h4>
                <div class="attribute-value flexrow">
                    <input name="data.hp.value" type="text" value="{{data.hp.value}}" data-dtype="Number"
                        placeholder="0" />
                    <span class="sep"> / </span>
                    <input name="data.hp.max" type="text" value="{{data.hp.max}}" data-dtype="Number" placeholder="0" />
                </div>
            </li>
            <li class="attribute hit-dice">
                <h4 class="attribute-name box-title" title="{{localize 'ACKS.HitDice'}}">
                    <a>{{ localize "ACKS.HitDiceShort" }}</a>
                </h4>
                <div class="attribute-value">
                    <input name="data.hp.hd" type="text" value="{{data.hp.hd}}" data-dtype="String" />
                </div>
            </li>
            <li class="attribute">
                {{#if config.ascendingAC}}
                <h4 class="attribute-name box-title" title="{{ localize 'ACKS.ArmorClass' }}">
                    {{ localize "ACKS.AscArmorClassShort" }}</h4>
                <div class="attribute-value">
                    <input name="data.aac.value" type="text" value="{{data.aac.value}}" data-dtype="Number"
                        placeholder="10" data-dtype="Number" />
                </div>
                {{else}}
                <h4 class="attribute-name box-title" title="{{ localize 'ACKS.ArmorClass' }}">
                    {{ localize "ACKS.ArmorClassShort" }}</h4>
                <div class="attribute-value">
                    <input name="data.ac.value" type="text" value="{{data.ac.value}}" data-dtype="Number"
                        placeholder="9" data-dtype="Number" />
                </div>
                {{/if}}
            </li>
            <li class="attribute attack">
                {{#if config.ascendingAC}}
                <h4 class="attribute-name box-title" title="{{localize 'ACKS.AB'}}"><a>{{ localize "ACKS.ABShort" }}</a>
                </h4>
                <div class="attribute-value">
                    <input name="data.thac0.bba" type="text" value="{{data.thac0.bba}}" placeholder="0"
                        data-dtype="Number" />
                </div>
                {{else}}
                <h4 class="attribute-name box-title" title="{{localize 'ACKS.Thac0'}}"><a>{{ localize "ACKS.Thac0" }}</a>
                </h4>
                <div class="attribute-value">
                    <input name="data.thac0.value" type="text" value="{{data.thac0.value}}" placeholder="0"
                        data-dtype="Number" />
                </div>
                {{/if}}
            </li>
            {{#if data.retainer.enabled}}
            <li class="attribute">
                <h4 class="attribute-name box-title" title="{{ localize 'ACKS.Loyalty' }}">
                    {{ localize "ACKS.LoyaltyShort" }}
                </h4>
                <div class="attribute-value">
                    <input name="data.retainer.loyalty" type="text" value="{{data.retainer.loyalty}}" placeholder="0"
                        data-dtype="Number" />
                </div>
            </li>
            {{/if}}
            <li class="attribute">
                <h4 class="attribute-name box-title" title="{{localize 'ACKS.movement.base'}}">
                    {{ localize "ACKS.movement.short" }}
                </h4>
                <div class="attribute-value">
                    <input name="data.movement.base" type="text" value="{{data.movement.base}}" placeholder="0"
                        data-dtype="Number" />
                </div>
            </li>
        </ul>
    </section>
    <section class="flexrow attribute-row">
        {{!-- Skills and abilities --}}
        <div class="flex3 panel inventory abilities">
            <div>
                <li class="item-titles flexrow panel-title">
                    <div class="item-name">{{localize 'ACKS.category.abilities'}} & {{localize 'ACKS.category.equipment'}}</div>
                    <div class="item-controls">
                        {{#if owner}}
                        <a class="item-control item-reset" title='{{localize "ACKS.items.resetAttacks"}}'><i
                                class="fas fa-sync"></i></a>
                        <a class="item-control item-create" title='{{localize "ACKS.Add"}}' data-type="choice"
                            data-choices="weapon,ability,armor,item"><i class="fas fa-plus"></i></a>
                        {{/if}}
                    </div>
                </li>
                <ol class="item-list resizable" data-base-size="240">
                    {{#each abilities as |item|}}
                    <li class="item-entry">
                        <div class="item flexrow" data-item-id="{{item._id}}">
                            <div class="item-pattern" title="{{localize 'ACKS.items.pattern'}}" style="background:linear-gradient(0.25turn, {{item.data.pattern}}, transparent)"></div>
                            <div class="item-name {{#if item.data.roll}}item-rollable{{/if}} flexrow">
                                <div class="item-image" style="background-image: url({{item.img}})"></div>
                                <h4 title="{{item.name}}">
                                    {{item.name~}}
                                </h4>
                            </div>
                            <div class="item-controls">
                                {{#if ../owner}}
                                <a class="item-control item-show" title='{{localize "ACKS.Show"}}'><i
                                        class="fas fa-eye"></i></a>
                                <a class="item-control item-edit" title='{{localize "ACKS.Edit"}}'><i
                                        class="fas fa-edit"></i></a>
                                <a class="item-control item-delete" title='{{localize "ACKS.Delete"}}'><i
                                        class="fas fa-trash"></i></a>
                                {{/if}}
                            </div>
                        </div>
                    </li>
                    {{/each}}
                    {{#each owned as |section| }}
                    {{#each section as |item|}}
                    <li class="item-entry">
                        <div class="item flexrow" data-item-id="{{item._id}}">
                            {{#if (eq item.type 'weapon')}}
                            <div class="item-pattern" title="{{localize 'ACKS.items.pattern'}}" style="background:linear-gradient(0.25turn, {{item.data.pattern}}, transparent)"></div>
                            {{/if}}
                            <div class="item-name {{#if (eq item.type 'weapon')}}item-rollable{{/if}}  flexrow">
                                <div class="item-image" style="background-image: url({{item.img}})"></div>
                                <h4 title="{{item.name}}">
                                    {{item.name~}}
                                </h4>
                            </div>
                            {{#if (eq item.type 'weapon')}}
                            <div class="field-long counter flexrow">
                                <input type="text" value="{{item.data.counter.value}}" data-dtype="Number"
                                    placeholder="0" data-field="value" title="{{localize 'ACKS.items.roundAttacks'}}">
                                /
                                <input type="text" value="{{item.data.counter.max}}" data-field="max"
                                    data-dtype="Number" placeholder="0"
                                    title="{{localize 'ACKS.items.roundAttacksMax'}}"></div>
                            {{/if}}
                            <div class="item-controls">
                                {{#if ../../owner}}
                                <a class="item-control item-edit" title='{{localize "ACKS.Edit"}}'><i
                                        class="fas fa-edit"></i></a>
                                <a class="item-control item-delete" title='{{localize "ACKS.Delete"}}'><i
                                        class="fas fa-trash"></i></a>
                                {{/if}}
                            </div>
                        </div>
                    </li>
                    {{/each}}
                    {{/each}}
                </ol>
            </div>
        </div>
        {{!-- Saving throws --}}
        <div class="attribute-group">
            <ul class="attributes">
                <li class="attacks-description">
                    {{#unless isNew}}
                    <label>{{ localize "ACKS.movement.details" }}</label>
                    <input name="data.movement.value" type="text" value="{{data.movement.value}}" data-dtype="String" />
                    {{else}}
                    <button data-action="generate-saves">{{localize "ACKS.dialog.generateSaves"}}</button>
                    {{/unless}}
                </li>
                <li class="attribute saving-throw" data-save="death">
                    <h4 class="attribute-name box-title">
                        <a>{{ localize "ACKS.saves.death.long" }}</a></h4>
                    <div class="attribute-value">
                        <input name="data.saves.death.value" type="text" value="{{data.saves.death.value}}"
                            placeholder="0" data-dtype="Number" />
                </li>
                <li class="attribute saving-throw" data-save="wand">
                    <h4 class="attribute-name box-title">
                        <a>{{ localize "ACKS.saves.wand.long" }}</a></h4>
                    <div class="attribute-value">
                        <input name="data.saves.wand.value" type="text" value="{{data.saves.wand.value}}"
                            placeholder="0" data-dtype="Number" />
                </li>
                <li class="attribute saving-throw" data-save="paralysis">
                    <h4 class="attribute-name box-title">
                        <a>{{ localize "ACKS.saves.paralysis.long" }}</a></h4>
                    <div class="attribute-value">
                        <input name="data.saves.paralysis.value" type="text" value="{{data.saves.paralysis.value}}"
                            placeholder="0" data-dtype="Number" />
                </li>
                <li class="attribute saving-throw" data-save="breath">
                    <h4 class="attribute-name box-title">
                        <a>{{ localize "ACKS.saves.breath.long" }}</a></h4>
                    <div class="attribute-value">
                        <input name="data.saves.breath.value" type="text" value="{{data.saves.breath.value}}"
                            placeholder="0" data-dtype="Number" />
                </li>
                <li class="attribute saving-throw" data-save="spell">
                    <h4 class="attribute-name box-title">
                        <a>{{ localize "ACKS.saves.spell.long" }}</a></h4>
                    <div class="attribute-value">
                        <input name="data.saves.spell.value" type="text" value="{{data.saves.spell.value}}"
                            placeholder="0" />
                </li>
            </ul>
        </div>
    </section>
</section>