{{~#if (ne selected false)~}}
<div class="tah-subgroup tah-list-subgroup" data-nest-id="{{nestId}}" data-part="subgroup" data-has-actions="{{~#if (tokenActionHudCoreTrue hasActions)~}}true{{~else~}}false{{~/if~}}" data-has-image="{{~#if (tokenActionHudCoreTrue settings.image)~}}true{{~else~}}false{{~/if~}}" data-level="{{level}}" data-type="{{type}}" data-show-title="{{settings.showTitle}}">
    {{~#if settings.image~}}
    <img class="tah-list-image{{~#if (tokenActionHudCoreTrue settings.collapse)}} tah-hidden{{~/if}}" src="{{settings.image}}"
        {{~#if tooltip.content~}} data-tooltip="{{tooltip.content}}" data-tooltip-class="tah-tooltip{{#if tooltip.class}} {{tooltip.class}}{{/if}}"{{#if tooltip.direction}} data-tooltip-direction="{{{tooltip.direction}}}"{{/if}}{{~/if~}}
    >{{~/if~}}
    <div class="tah-list-subgroup{{~#if class}} {{class}}{{~/if~}}" data-part="listSubgroup">
        <div class="tah-list-subgroup-title{{~#if subtitleClass}} {{subtitleClass}}{{~/if~}}" data-action="clickSubgroup" data-part="listSubgroupTitle">
            {{~#if icon~}}<div class="tah-icon">{{{icon}}}</div>{{~/if~}}
            {{~#if icon1~}}<div class="tah-icon">{{{icon1}}}</div>{{~/if~}}
            {{~#if icon2~}}<div class="tah-icon">{{{icon2}}}</div>{{~/if~}}
            {{~#if icon3~}}<div class="tah-icon">{{{icon3}}}</div>{{~/if~}}
            <div class="tah-list-subgroup-title-text">{{tokenActionHudCoreCap name}}</div>
            {{~#if info1.text~}}<div class="tah-info tah-info1{{~#if info1.class}} {{info1.class}}{{~/if~}}" data-tooltip="{{~#if info1.title}}{{info1.title}}{{~else~}}{{info1.text}}{{~/if}}" data-tooltip-class="tah-tooltip">{{info1.text}}</div>{{~/if~}}
            {{~#if info2.text~}}<div class="tah-info tah-info2{{~#if info2.class}} {{info2.class}}{{~/if~}}" data-tooltip="{{~#if info2.title}}{{info2.title}}{{~else~}}{{info2.text}}{{~/if}}" data-tooltip-class="tah-tooltip">{{info2.text}}</div>{{~/if~}}
            {{~#if info3.text~}}<div class="tah-info tah-info2{{~#if info3.class}} {{info3.class}}{{~/if~}}" data-tooltip="{{~#if info3.title}}{{info3.title}}{{~else~}}{{info3.text}}{{~/if}}" data-tooltip-class="tah-tooltip">{{info3.text}}</div>{{~/if~}}
            {{~#if collapsibleSubgroups}}
            <i class="tah-collapse-icon{{~#if (tokenActionHudCoreTrue settings.collapse)}} tah-hidden{{~/if}} fa fa-chevron-down"></i>
            <i class="tah-expand-icon{{~#if (tokenActionHudCoreTrue settings.collapse)}}{{else}} tah-hidden{{~/if}} fa fa-chevron-up"></i>
            {{~/if}}
            <i class="tah-edit-icon fa fa-pen-to-square" aria-hidden="true"></i>
        </div>
        <div class="tah-subgroups{{~#if (tokenActionHudCoreTrue settings.collapse)}} tah-hidden{{~/if~}}" data-part="subgroups">
            {{~#if (tokenActionHudCoreTrue hasActions)~}}
            <div class="tah-actions{{~#if actionsClass}} {{actionsClass}}{{~/if~}}" data-part="actions">
                {{#each actions}}
                    {{>"modules/token-action-hud-core/templates/action.hbs"}}
                {{/each}}
            </div>
            {{~/if~}}
            {{~#if (tokenActionHudCoreTrue groups.lists.length)~}}
            <div class="tah-list-subgroups" data-part="listSubgroups">
                {{#each groups.lists}}
                    {{>"modules/token-action-hud-core/templates/list-subgroup.hbs" collapsibleSubgroups=../collapsibleSubgroups categoryId=../id}}
                {{/each}}
            </div>
            {{~/if~}}
            {{~#if (tokenActionHudCoreTrue groups.tabs.length)~}}
            <div class="tah-tab-subgroups" data-part="tabSubgroups">
                {{#each groups.tabs}}
                    {{>"modules/token-action-hud-core/templates/tab-subgroup.hbs" categoryId=../id}}
                {{/each}}
            </div>
            {{~/if~}}
        </div>
    </div>
</div>
{{~/if~}}