<header class="heroActions-header">
    {{@root.i18n 'label'}}
    {{#if isOwner}}
    <div class="controls">
        {{#if usesCount}}
        <button type="button" class="redraw" data-hero-action="actions-draw">
            <i class="fa-regular fa-cards-blank"></i>
            {{@root.i18n 'redraw'}}
        </button>
        {{else if mustDraw}}
        <button type="button" class="draw" data-hero-action="actions-draw">
            <i class="fa-regular fa-cards-blank"></i>
            {{@root.i18n 'draw' nb=diff}}
        </button>
        {{/if}}
        {{#if canTrade}}
        <button type="button" data-hero-action="actions-trade">
            <i class="fas fa-right-left"></i> {{@root.i18n 'trade'}}
        </button>
        {{/if}}
        {{#if isGM}}
        <button type="button" class="give" data-hero-action="give-actions">
            <i class="fa-solid fa-gift"></i> {{@root.i18n 'give'}}
        </button>
        {{/if}}
    </div>
    {{/if}}
</header>
<ol class="actions-list item-list directory-list heroActions-list" {{#if mustDiscard}}
    data-discard="{{diff}}" {{/if}}>
    {{#each actions as |action|}}
    <li class="item action" data-uuid="{{action.uuid}}">
        <div class="item-name">
            <div data-hero-action="action-chat" class="item-image"
                style="background-image: url({{resolvePath 'icons/actions/Passive.webp'}})">
                <i class="fas fa-comment-alt"></i>
            </div>
            <h4 data-hero-action="action-expand">{{action.name}}</h4>
        </div>
        {{#if @root.isOwner}}
        <div class="item-controls">
            {{#if @root.canUse}}
            <button type="button" data-hero-action="action-use">
                {{@root.i18n 'action.use'}}
            </button>
            {{/if}}
            {{#if @root.mustDiscard}}
            <button type="button" class="discard" data-hero-action="action-discard">
                {{@root.i18n 'action.discard'}}
            </button>
            {{/if}}
        </div>
        {{/if}}
        <div class="item-summary" hidden="hidden">
            <div class="item-description"></div>
        </div>
    </li>
    {{/each}}
</ol>
