<section class="tab {{tabs.attacks.id}} {{tabs.attacks.cssClass}}"
         data-tab="{{tabs.attacks.id}}"
         data-group="{{tabs.attacks.group}}">
    <table class="attacks-table">
        <thead>
        <tr>
            <th>Name</th>
            <th>Attacke</th>
            <th>Parade</th>
            <th>Schaden</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        {{#each this.attacks}}
            <tr>
                <td>
                    <input type="text" name="{{this.namepath}}"
                           value="{{this.name}}"/>
                </td>
                <td class="rollable tablecell">
                    <div class="attacks-die die rollable attack" data-action="roll" data-actor="{{actor.name}}"
                         data-roll-type="attack" data-roll-name="{{this.name}}" data-roll="1d20cs<{{this.at}}">
                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                    </div>
                    <input type="text" name="{{this.atpath}}"
                           value="{{this.at}}"/>
                </td>
                <td class="rollable tablecell">
                    <div class="attacks-die die" data-action="roll" data-roll-type="parry"
                         data-roll-name="{{this.name}}"
                         data-roll="1d20cs<{{this.pa}}">
                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                    </div>
                    <input type="text" name="{{this.papath}}"
                           value="{{this.pa}}"/>
                </td>
                <td class="rollable tablecell">
                    <div class="attacks-die die" data-action="roll" data-roll-type="damage"
                         data-roll-name="{{this.name}}"
                         data-roll="{{this.tp}}">
                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                    </div>
                    <input type="text" name="{{this.tppath}}"
                           value="{{this.tp}}"/>
                </td>
                <td>
                    <button type="button" class="button-inline remove-attack" data-action="removeAttack" data-index="{{this.index}}">
                        <i class="fa-solid fa-trash"></i></button>
                </td>
            </tr>
        {{/each}}
        </tbody>
        <tfoot class="editor">
        <tr>
            <th colspan="5">Attacke hinzufügen</th>
        </tr>
        <tr>

            <td>
                <input type="text" id="attack_name"/>
            </td>

            <td>
                <input type="text" id="attack_at" placeholder="8"/>
            </td>
            <td>
                <input type="text" id="attack_pa" placeholer="12"/>
            </td>
            <td>

                <input type="text" id="attack_tp" placeholder="1d6+3"/>
            </td>
            <td>
                <button type="button" data-action="addAttack" class="button-inline add-attack"><i class="fa-solid fa-plus"></i>
                </button>
            </td>

        </tr>
        </tfoot>
    </table>
</section>