{
  "$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{var $v_id = ($p['id'] ?? null)}\n{var $v_title = ($p['title'] ?? null)}\n{var $v_products = ($p['products'] ?? null)}\n{var $v_labels = ($p['labels'] ?? null)}\n{var $v_badges = ($p['badges'] ?? null)}\n{var $v_layout = ($p['layout'] ?? 'grid')}\n{var $v_cols = ($p['cols'] ?? '1-3')}\n{var $v_ratio = ($p['ratio'] ?? '4/3')}\n{var $v_rating = ($p['rating'] ?? 'show')}\n{var $v_action = ($p['action'] ?? 'button')}\n{var $v_tone = ($p['tone'] ?? 'default')}\n{var $v_density = ($p['density'] ?? 'default')}\n{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}\n{capture $c_4}\n  {if og_t(og_eq(og_len($v_products), 0))}\n    {=og_include('blocks/empty-state.latte', ['p' => ['icon' => 'package', 'title' => og_get($v_labels, ['empty'])]])|noescape}\n  {elseif og_t(og_eq($v_layout, 'rail'))}\n    {capture $c_2}\n      {foreach og_l($v_products) as $v_p}\n        {capture $c_1}\n          {=og_include('blocks/product-card.latte', ['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')]])|noescape}\n        {/capture}\n        {=og_include('compose/Box.latte', ['class' => 'w-64 shrink-0 snap-start', 'attrs' => og_attrs(['data-slot', 'product']), 'children' => (string) $c_1])|noescape}\n      {/foreach}\n    {/capture}\n    {=og_include('compose/Box.latte', ['class' => 'flex snap-x gap-4 overflow-x-auto pb-4', 'attrs' => og_attrs(['data-slot', 'items']), 'children' => (string) $c_2])|noescape}\n  {else}\n    {capture $c_3}\n      {foreach og_l($v_products) as $v_p}\n        {=og_include('blocks/product-card.latte', ['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')]])|noescape}\n      {/foreach}\n    {/capture}\n    {=og_include('compose/Grid.latte', ['cols' => og_s((og_t(og_eq($v_layout, 'list')) ? '1' : $v_cols)), 'class' => 'gap-4', 'attrs' => og_attrs(['data-slot', 'items']), 'children' => (string) $c_3])|noescape}\n  {/if}\n{/capture}\n{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'tone' => $v_tone, 'density' => $v_density, 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_4)])|noescape}\n",
      "path": "blocks/product-grid.latte",
      "target": "blocks/product-grid.latte"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "catalog",
    "kind": "block",
    "tags": [
      "latte",
      "block"
    ]
  },
  "name": "product-grid",
  "registryDependencies": [
    "box",
    "empty-state",
    "grid",
    "product-card",
    "section-frame",
    "utils"
  ],
  "runtime": "latte",
  "title": "Product Grid",
  "type": "registry:block"
}
