{{#*inline "actionName"}}
    {{action.name}} {{#if bonus includeZero=true}}({{signedInteger bonus}}){{/if}}
{{/inline}}
{{#*inline "actionTooltip"}}
    {{> actionName}} {{ifThen best (localize "xdy-pf2e-workbench.macros.basicActionMacros.YouAreTheBestInYourParty")""}}
{{/inline}}
{{#if action.showMAP}}
    <div class="bam-map-wrapper">
        <button class="bam-action-btn{{#if best}} glow{{/if}}" data-action="{{idx}}" data-map="0"
                data-rank="{{rank}}" data-tooltip="{{> actionTooltip}}">
            <img src="{{coalesce action.icon "systems/pf2e/icons/actions/craft/unknown-item.webp"}}" height="24"
                 width="24" alt="{{> actionName}}" />
            {{> actionName}}
        </button>
        <button class="bam-action-btn{{#if best}} glow{{/if}}" data-action="{{idx}}" data-map="{{action.MAP.[0]}}"
                data-rank="{{rank}}">
            {{action.MAP.[0]}}
        </button>
        <button class="bam-action-btn{{#if best}} glow{{/if}}" data-action="{{idx}}" data-map="{{action.MAP.[1]}}"
                data-rank="{{rank}}">
            {{action.MAP.[1]}}
        </button>
    </div>
{{else}}
    <button class="bam-action-btn{{#if best}} glow{{/if}}" data-action="{{idx}}" data-rank="{{rank}}"
            data-tooltip="{{> actionTooltip}}">
        <img src="{{coalesce action.icon "systems/pf2e/icons/actions/craft/unknown-item.webp"}}" height="24"
             alt="{{name}}" />
        {{> actionName}}
    </button>
{{/if}}
