<form autocomplete="off">
    <label>{{prompt}}</label>
    <div class="item-row">
        <img src="{{item.img}}" />
        <span class="name">{{item.name}}</span>
        {{#if (gt item.quantity 1)}}
            <div class="quantity">
                x
                <input type="number" name="quantity" value="{{quantity}}" min="1" max="{{item.quantity}}" step="1" />
            </div>
        {{/if}}
    </div>
    <div class="form-group">
        {{#if lockStack}}
            <input type="hidden" name="newStack" value="true" data-dtype="Boolean" />
        {{else}}
            <label>{{localize "PF2E.loot.Stack"}}</label>
            <input type="checkbox" name="newStack" {{checked newStack}} />
        {{/if}}
    </div>

    <div class="dialog-buttons">
        {{#if options.isPurchase}}
            {{#if canGift}}
                <button type="submit" data-action="give">
                    <i class="fa-regular fa-floppy-disk"></i>{{localize "PF2E.loot.Give"}}
                </button>
            {{/if}}
            <button type="submit">
                <i class="fa-regular fa-coins"></i>{{localize "PF2E.loot.Purchase"}}
                <span class="price"></span>
            </button>
        {{else}}
            <button type="submit">
                <i class="fa-regular fa-floppy-disk"></i>{{localize "PF2E.loot.MoveLoot"}}
            </button>
        {{/if}}
    </div>
</form>
