{{#*inline "description"}}
    <div class="card description {{#if collapsible}}collapsible{{/if}} {{#if (lookup @root.collapsed target)}}collapsed{{/if}} {{#unless enriched}}empty{{/unless}}"
         data-target="{{ target }}">
        <div class="header">
            <span>{{ localize label }}</span>
            {{#if @root.owner}}
            <button type="button" class="description-edit unbutton" data-target="{{ target }}"
                    aria-label="{{ localize "DND5E.DescriptionEdit" description=(localize label) }}">
                <i class="fas fa-feather" inert></i>
            </button>
            {{/if}}
        </div>
        <div class="details collapsible-content">
            <div class="wrapper">
                {{ editor enriched target=target button=false editable=false engine="prosemirror" }}
            </div>
        </div>
    </div>
{{/inline}}

<div class="tab {{#if singleDescription}}single-description{{/if}}" data-group="primary" data-tab="description">

    {{#if editingDescriptionTarget}}
        {{ editor enriched.editing target=editingDescriptionTarget button=false editable=true engine="prosemirror"
                  collaborate=true }}
    {{else}}

    {{#if (eq item.type "spell")}}
        {{> "dnd5e.spell-block" activation=system.activation fullWidth=true }}
    {{/if}}

    {{#if info}}
    <div class="info-block">
        {{#each info}}
        <div {{#if classes}}class="{{ classes }}"{{/if}}>
            {{#if label}}
            <div class="label">
                <span>{{ localize label }}</span>
                {{#if (and @root.editable config)}}
                <a class="config-button" data-action="{{ config }}" data-tooltip="{{ tooltip }}"
                   aria-label="{{ localize tooltip }}">
                    <i class="fas fa-cog"></i>
                </a>
                {{/if}}
            </div>
            {{/if}}
            <div class="value">{{{ value }}}</div>
        </div>
        {{/each}}
    </div>
    {{/if}}

    {{#if singleDescription}}
        {{ editor enriched.description target="system.description.value" button=false editable=editable
                  engine="prosemirror" collaborate=true }}
    {{else}}

    <div class="item-descriptions">

        {{!-- When identified, show extra descriptions --}}
        {{#if (or isIdentified user.isGM)}}

            {{!-- All users see the main, identified description --}}
            {{> description collapsible=owner label="DND5E.Description" target="system.description.value"
                enriched=enriched.description }}

            {{!-- Only GM users are able to see and edit the unidentified description --}}
            {{#if (and isIdentifiable user.isGM)}}
                {{> description collapsible=true label="DND5E.DescriptionUnidentified"
                    target="system.unidentified.description" enriched=enriched.unidentified }}
            {{/if}}

            {{!-- Owners can see and edit the chat description. It is only visible to non-owners if not blank. --}}
            {{#if (or owner system.description.chat)}}
                {{> description collapsible=owner label="DND5E.DescriptionChat" target="system.description.chat"
                    enriched=enriched.chat }}
            {{/if}}

        {{else}}

        {{!-- When unidentified, non-GM users can only see and edit the unidentified description --}}
        {{#if (or owner system.unidentified.description)}}
            {{> description collapsible=false label="DND5E.Description" target="system.unidentified.description"
                enriched=enriched.unidentified }}
        {{/if}}

        {{/if}}

    </div>

    {{/if}}

    {{/if}}

    {{#if (or isIdentified user.isGM)}}
    <ul class="pills">
        {{#each properties.active}}
        <li class="pill transparent">
            <span class="label">{{ this }}</span>
        </li>
        {{/each}}
    </ul>
    {{/if}}

</div>
