<section class="tab {{tabs.commonality.id}} {{tabs.commonality.cssClass}}"
         data-tab="{{tabs.commonality.id}}"
         data-group="{{tabs.commonality.group}}">

    <section>

        {{#if editable}}
            <fieldset>
                <legend>Neue Verbreitung</legend>
                <div class="content">
                    <label><span>Gottheit</span>
                        <input name="deity" type="text"/>
                    </label>
                    <label><span>Grad</span>
                        <input name="grad" type="number" min="0" max="7" step="1"/>
                    </label>
                    <div class="actions">
                        <button type="button" data-action="addCommonality"><i class="fa-solid fa-plus"></i> Hinzugefügen</button>
                    </div>
                </div>
            </fieldset>
        {{/if}}

        <div class="commonalities">
            {{#each system.herkunft}}
                <div class="commonality">
                    <span class="deity">{{this.name}}</span>
                    <span class="rank">Grad {{grad}}</span>
                    {{#if ../editable}}
                        <button type="button" class="action" data-action="removeCommonality" data-id="{{@key}}"><i
                                class="fa-solid fa-xmark"></i></button>
                    {{/if}}
                </div>
            {{/each}}
        </div>
    </section>

</section>

