<form class="hand-mini-bar-window" autocomplete="off">
  {{#if isOwner}}
    <div class="hand-mini-bar-window-buttons">
      {{#unless isFaceUpMode}}
        <div class="hand-mini-bar-window-button hand-mini-bar-win-flip-cards">
          <i class="fas hand-mini-bar-flip-icon"></i>
          {{localize "HANDMINIBAR.FlipAllCards"}}
        </div>
      {{/unless}}
      {{#if isHand}}
        <div class="hand-mini-bar-window-button hand-mini-bar-win-draw-cards">
        <i class="fas fa-plus"></i>
          {{localize "HANDMINIBAR.Draw"}}
        </div>
      {{/if}}
      {{#unless isHand}}
        <div class="hand-mini-bar-window-button hand-mini-bar-win-shuffle-cards">
          <i class="fas fa-random"></i>
          {{localize "HANDMINIBAR.Shuffle"}}
        </div>
      {{/unless}}
      {{#if isDeck}}
        <div class="hand-mini-bar-window-button hand-mini-bar-win-deal-cards">
          <i class="fas fa-share-square"></i>
          {{localize "HANDMINIBAR.Deal"}}
        </div>
      {{else}}
        <div class="hand-mini-bar-window-button hand-mini-bar-win-pass-cards">
          <i class="fas fa-share-square"></i>
          {{localize "HANDMINIBAR.Pass"}}
        </div>
      {{/if}}
      <div class="hand-mini-bar-window-button hand-mini-bar-win-reset-cards">
        <i class="fas fa-undo"></i>
        {{localize "HANDMINIBAR.Reset"}}
      </div>
    </div>
  {{/if}}
  <div class="hand-mini-bar-window-cards {{pileType}} {{#if showPlayers}}show-players{{/if}}">
    <!-- If a deck only show cards that aren't played yet -->
    <!-- if show players is set then the cards are separated into player lists -->
    {{#if showPlayers}}
      {{#each cards}}
        <div class="hand-mini-bar-window-player-container">
          <h3 class="hand-mini-bar-window-player-container-name">{{@key}}</h3>
          <div class="hand-mini-bar-window-player-container-cards">
            {{#each this}}
              <div class="hand-mini-bar-window-card card" style="background-image:url('{{this.img}}')" title="{{this.name}}" data-card-id="{{this.id}}" data-card-uuid="{{this.uuid}}" data-cards-id="{{cardsid}}" data-img="{{this.img}}" draggable="true">
              </div>
            {{/each}}
          </div>
        </div>
      {{/each}}
    {{else if isHand}}
      {{#each cards}}
        <div class="hand-mini-bar-window-cards-row">
          {{#each this}}
            <div class="hand-mini-bar-window-card card" style="background-image:url('{{this.img}}')" title="{{this.name}}" data-card-id="{{this.id}}" data-card-uuid="{{this.uuid}}" data-cards-id="{{cardsid}}" data-img="{{this.img}}" draggable="true">
            </div>
          {{/each}}
        </div>
      {{/each}}
    <!-- If a pile or Deck show all cards in grid-->
    {{else}}
      {{#each cards}}
        <div class="hand-mini-bar-window-card card" style="background-image:url('{{this.img}}')" title="{{this.name}}" data-card-id="{{this.id}}" data-card-uuid="{{this.uuid}}" data-cards-id="{{cardsid}}" data-img="{{this.img}}" draggable="true">
        </div>
      {{/each}}
    {{/if}}
  </div>
</form>