{
  "$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 = og_def(p['id'], none) -%}\n{%- set v_title = og_def(p['title'], none) -%}\n{%- set v_products = og_def(p['products'], none) -%}\n{%- set v_labels = og_def(p['labels'], none) -%}\n{%- set v_badges = og_def(p['badges'], none) -%}\n{%- set v_layout = og_def(p['layout'], 'grid') -%}\n{%- set v_cols = og_def(p['cols'], '1-3') -%}\n{%- set v_ratio = og_def(p['ratio'], '4/3') -%}\n{%- set v_rating = og_def(p['rating'], 'show') -%}\n{%- set v_action = og_def(p['action'], 'button') -%}\n{%- set v_tone = og_def(p['tone'], 'default') -%}\n{%- set v_density = og_def(p['density'], 'default') -%}\n{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}\n{%- set c_4 -%}\n  {%- if og_t(og_eq(og_len(v_products), 0)) %}\n    {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'package', 'title': og_get(v_labels, ['empty'])}}) }}\n  {%- elif 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          {{ og_include('blocks/product-card.html.j2', {'p': {'product': v_p, 'labels': v_labels, 'badges': v_badges, 'layout': ('horizontal' if og_t(og_eq(v_layout, 'list')) else 'vertical'), 'ratio': v_ratio, 'rating': v_rating, 'action': v_action, 'density': ('compact' if og_t(og_eq(v_density, 'compact')) else 'default')}}) }}\n        {%- endset -%}\n        {{ og_include('compose/box.html.j2', {'p': {'Class': 'w-64 shrink-0 snap-start', 'Attrs': og_attrs(['data-slot', 'product'])}, 'children': c_1}) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ og_include('compose/box.html.j2', {'p': {'Class': 'flex snap-x gap-4 overflow-x-auto pb-4', 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_2}) }}\n  {%- else %}\n    {%- set c_3 -%}\n      {%- for v_p in og_l(v_products) %}\n        {{ og_include('blocks/product-card.html.j2', {'p': {'product': v_p, 'labels': v_labels, 'badges': v_badges, 'layout': ('horizontal' if og_t(og_eq(v_layout, 'list')) else 'vertical'), 'ratio': v_ratio, 'rating': v_rating, 'action': v_action, 'density': ('compact' if og_t(og_eq(v_density, 'compact')) else 'default')}}) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ og_include('compose/grid.html.j2', {'p': {'Cols': og_s(('1' if og_t(og_eq(v_layout, 'list')) else v_cols)), 'Class': 'gap-4', 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_3}) }}\n  {%- endif %}\n{%- endset -%}\n{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_4)}) }}\n",
      "path": "blocks/product-grid.html.j2",
      "target": "blocks/product-grid.html.j2"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "catalog",
    "kind": "block",
    "tags": [
      "jinja2",
      "block"
    ]
  },
  "name": "product-grid",
  "registryDependencies": [
    "box",
    "empty-state",
    "grid",
    "product-card",
    "section-frame",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Product Grid",
  "type": "registry:block"
}
