<form class="flexcol {{cssClass}}" autocomplete="off">
{{> "systems/shadowrun-de/templates/item/item-sheet-header.hbs" }}

    {{!-- Sheet Body --}}
    <section class="sheet-body">
        <div class="section" style="display: inline-table;">
            <table>
                <tr>
                    <th colspan="2">{{localize 'shadowrun6.spell.category'}}</th>
                    <th colspan="2">{{localize 'shadowrun6.spell.type'}}</th>
                    <th>{{localize 'shadowrun6.spell.isOpposed'}}</th>
                    {{#if (eq item.system.category "combat")}}
                    <th>{{localize 'shadowrun6.spell.combatSpellType'}}</th>
                    {{else}}
                    <th>{{localize 'shadowrun6.spell.withEssence'}}</th>
                    {{/if}}
                </tr>
                <tr style="text-align:center">
                    <td colspan="2">
                        <select name="system.category" data-field="system.category">
                            {{selectOptions config.spell_category selected=item.system.category localize=true}}
                        </select>
                    </td>
                    <td colspan="2">
                        <select name="system.type" data-field="system.type">
                            {{selectOptions config.spell_type selected=item.system.type localize=true}}
                        </select>
                    </td>
                    <td><input name="system.isOpposed" style="vertical-align: middle;" type="checkbox" {{checked item.system.isOpposed}} data-field="system.isOpposed" /></td>
                    <td>
                    {{#if (eq item.system.category "combat")}}
                        <select name="system.combatSpellType" data-field="system.combatSpellType">
                            {{selectOptions config.combat_spell_type selected=item.system.combatSpellType localize=true}}
                        </select>
                    {{else}}
                        <input name="system.withEssence" style="vertical-align: middle;" type="checkbox" {{checked item.system.withEssence}} data-field="system.withEssence" />
                    {{/if}}
                    </td>
                </tr>
                <tr style="text-align:center">
                    <th colspan="2">{{localize 'shadowrun6.spell.range'}}</th>
                    <th colspan="2">{{localize 'shadowrun6.spell.duration'}}</th>
                    <th>{{localize 'shadowrun6.spell.drain'}}</th>

                    <!-- {{#if (eq item.system.threshold "//no spells have a static threshold//")}}
                    <th>{{localize 'shadowrun6.roll.threshold'}}</th>
                    {{else}}
                    <th></th>
                    {{/if}} -->

                    {{#if (eq item.system.category "combat")}}
                    <th>{{localize 'shadowrun6.spell.damage'}}</th>
                    {{else}}
                    <th></th>
                    {{/if}}
                </tr>
                <tr style="text-align:center">
                    <td colspan="2">
                        <select name="system.range" data-field="system.range">
                            {{selectOptions config.spell_range selected=item.system.range localize=true}}
                        </select>
                    </td>
                    <td colspan="2">
                        <select name="system.duration" data-field="system.duration">
                            {{selectOptions config.spell_duration selected=item.system.duration localize=true}}
                        </select>
                    </td>
                    <td class="centered">
                        <input name="system.drain" data-field="system.drain" value="{{item.system.drain}}" type="number" class="box centered" style="width:2em"/>
                    </td>

                    <!-- {{#if (eq item.system.threshold "//no spells have a static threshold//")}}
                    <td class="centered">
                        <input data-field="system.threshold" value="{{item.system.threshold}}" type="number" class="box centered" style="width:2em"/>
                    </td>
                    {{else}}
                    <td></td>
                    {{/if}} -->

                    {{#if (eq item.system.category "combat")}}
                    <td>
                        <select name="system.damage" data-field="system.damage">
                            {{selectOptions config.spell_damage selected=item.system.damage localize=true}}
                        </select>
                    </td>
                    {{else}}
                    <td></td>
                    {{/if}}
                </tr>
            </table>
            <h3>{{localize 'shadowrun6.item.description'}}</h3>
            {{editor item.enriched.description target="system.description" fieldName=item.system.description button=true owner=owner editable=editable engine="prosemirror"}}
        </div>
    </section>
</form>

{{> "systems/shadowrun-de/templates/item/item-effects.hbs" }}