{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Products as cards in a grid, a list or a rail that scrolls sideways.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n    Source: packages/compose-gen/specs/organisms/product-grid.json\n    A section with a heading and the products as cards in a grid, as a list of horizontal cards, or as a rail that scrolls sideways; an empty state when there are none. Axes: layout (grid, list, rail), columns, ratio, rating, action, tone, density.\n    Props (p): id, title, products, labels, badges, layout, cols, ratio, rating, action, tone, density, landmarkLabel. -#}\n{%- set v_id = (p.id ?? null) -%}\n{%- set v_title = (p.title ?? null) -%}\n{%- set v_products = (p.products ?? null) -%}\n{%- set v_labels = (p.labels ?? null) -%}\n{%- set v_badges = (p.badges ?? null) -%}\n{%- set v_layout = (p.layout ?? 'grid') -%}\n{%- set v_cols = (p.cols ?? '1-3') -%}\n{%- set v_ratio = (p.ratio ?? '4/3') -%}\n{%- set v_rating = (p.rating ?? 'show') -%}\n{%- set v_action = (p.action ?? 'button') -%}\n{%- set v_tone = (p.tone ?? 'default') -%}\n{%- set v_density = (p.density ?? 'default') -%}\n{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}\n{%- set c_4 -%}\n  {%- if og_t(og_eq(og_len(v_products), 0)) %}\n    {{ include('blocks/empty-state.html.twig', {'p': {'icon': 'package', 'title': og_get(v_labels, ['empty'])}}, with_context = false) }}\n  {%- elseif og_t(og_eq(v_layout, 'rail')) %}\n    {%- set c_2 -%}\n      {%- for v_p in og_l(v_products) %}\n        {%- set c_1 -%}\n          {{ include('blocks/product-card.html.twig', {'p': {'product': v_p, 'labels': v_labels, 'badges': v_badges, 'layout': (og_t(og_eq(v_layout, 'list')) ? 'horizontal' : 'vertical'), 'ratio': v_ratio, 'rating': v_rating, 'action': v_action, 'density': (og_t(og_eq(v_density, 'compact')) ? 'compact' : 'default')}}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/Box.html.twig', {'class': 'w-64 shrink-0 snap-start', 'attrs': og_attrs(['data-slot', 'product']), 'children': c_1}, with_context = false) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ include('compose/Box.html.twig', {'class': 'flex snap-x gap-4 overflow-x-auto pb-4', 'attrs': og_attrs(['data-slot', 'items']), 'children': c_2}, with_context = false) }}\n  {%- else %}\n    {%- set c_3 -%}\n      {%- for v_p in og_l(v_products) %}\n        {{ include('blocks/product-card.html.twig', {'p': {'product': v_p, 'labels': v_labels, 'badges': v_badges, 'layout': (og_t(og_eq(v_layout, 'list')) ? 'horizontal' : 'vertical'), 'ratio': v_ratio, 'rating': v_rating, 'action': v_action, 'density': (og_t(og_eq(v_density, 'compact')) ? 'compact' : 'default')}}, with_context = false) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ include('compose/Grid.html.twig', {'cols': og_s((og_t(og_eq(v_layout, 'list')) ? '1' : v_cols)), 'class': 'gap-4', 'attrs': og_attrs(['data-slot', 'items']), 'children': c_3}, with_context = false) }}\n  {%- endif %}\n{%- endset -%}\n{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_4)}, with_context = false) }}\n",
      "path": "blocks/product-grid.html.twig",
      "target": "blocks/product-grid.html.twig"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "catalog",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "product-grid",
  "registryDependencies": [
    "box",
    "empty-state",
    "grid",
    "product-card",
    "section-frame",
    "utils"
  ],
  "runtime": "twig",
  "title": "Product Grid",
  "type": "registry:block"
}
