<div class="header{{#if greyedOut}} greyed{{/if}}">
    <div class="image" style="background-image: url('{{ifThen custom.img custom.img usedImage}}');">
        {{!-- uses --}}
        {{#with uses as |uses|}}
        <div class="uses">
            <span>{{uses.value}}</span>
            {{#if uses.max}}
            / <span>{{uses.max}}</span>
            {{/if}}
        </div>
        {{/with}}
    </div>
    <div class="title">{{ifThen custom.name custom.name title}}</div>
    <div class="subtitle">
        {{!-- action cost --}}
        {{#with cost as |cost|}}
        <div class="cost glyph">
            {{{actionGlyph cost.value}}}
        </div>
        {{/with}}
        {{subtitle}}
    </div>
</div>
{{#with unusableReason as |reason|}}
<div class="details left">
    {{@root.i18n 'reason' reason}}
</div>
{{/with}}
<div class="details right">
    {{#unless inactive}}
    {{#if canAltUse}}
    <div>{{@root.i18n.root 'rightClick'}} {{altUseLabel}}</div>
    <div>{{@root.i18n 'click.control'}} {{@root.i18n 'click.popup'}}</div>
    {{else if canOpenPopup}}
    <div>{{@root.i18n.root 'rightClick'}} {{@root.i18n 'click.popup'}}</div>
    {{/if}}
    {{/unless}}
</div>
