<div class="grid 2xl:grid-cols-8 xl:grid-cols-6 lg:grid-cols-4 grid-cols-2 gap-3 flex-wrap">
  @if (loading()) {
    @for (_ of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15]; track $index) {
      <div class="flex-1 aspect-[0.9]">
        <p-skeleton width="100%" height="100%"></p-skeleton>
      </div>
    }
  } @else {
    @for (product of products(); track product.id) {
      <div class="flex-1 bg-surface-card rounded-lg p-1 shadow-xs">
        <img [src]="productPlaceholder" class="w-full aspect-[1.3] object-cover rounded-md" />
        <div class="mt-2">
          <span class="text-lg font-bold">
            {{ product.product.name }}
            <small class="text-xs text-muted-color">({{ product.quantity }})</small>
          </span>
          <div class="flex items-center justify-between mt-1">
            <span [appPriceMask]="product.product.salePrice" class="text-base font-bold"></span>
            <button pButton type="button" icon="pi pi-plus" size="small" (click)="addProduct(product.product)"></button>
          </div>
        </div>
      </div>
    }
  }
</div>
