<div class="sw5e chat-card item-card" data-actor-id="{{actor._id}}" data-item-id="{{item._id}}"
     {{#if tokenId}}data-token-id="{{tokenId}}"{{/if}} {{#if isPower}}data-power-level="{{item.data.level}}"{{/if}}>
    <header class="card-header flexrow">
        <img src="{{item.img}}" title="{{item.name}}" width="36" height="36"/>
        <h3 class="item-name">{{item.name}}</h3>
    </header>

    <div class="card-content">
        {{{data.description.value}}}
        {{#if data.materials.value}}
        <p><strong>{{ localize "SW5E.RequiredMaterials" }}.</strong> {{data.materials.value}}</p>
        {{/if}}
    </div>

    <div class="card-buttons">
        {{#if hasAttack}}<button data-action="attack">{{ localize "SW5E.Attack" }}</button>{{/if}}

        {{#if hasDamage}}
        <button data-action="damage">
            {{#if isHealing}}{{ localize "SW5E.Healing" }}
            {{else}}{{localize "SW5E.Damage" }}{{/if}}
        </button>
        {{/if}}

        {{#if isVersatile}}
        <button data-action="versatile">{{ localize "SW5E.Versatile" }}</button>
        {{/if}}

        {{#if hasSave}}
        <button data-action="save" data-ability="{{data.save.ability}}" disabled>
            {{ localize "SW5E.SavingThrow" }} {{labels.save}}
        </button>
        {{/if}}

        {{#if data.formula}}
        <button data-action="formula">{{ localize "SW5E.OtherFormula"}}</button>
        {{/if}}

        {{#if hasAreaTarget}}
        <button data-action="placeTemplate">{{ localize "SW5E.PlaceTemplate" }}</button>
        {{/if}}
    </div>

    <footer class="card-footer">
        {{#each data.properties}}
        <span>{{this}}</span>
        {{/each}}
    </footer>
</div>
