{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Cards with a quantity field and an add button, under a live cart count.",
  "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/dish-cart-grid.json\n    Dishes added to the cart from the card: the live cart count over a grid of cards, each with a picture, name, weight, price and a quantity field named after the dish beside the add button. Axes: media (image, none), tone.\n    Props (p): id, title, lead, dishes, empty, labels, count, media, tone, landmarkLabel. -#}\n{%- set v_id = og_def(p['id'], none) -%}\n{%- set v_title = og_def(p['title'], none) -%}\n{%- set v_lead = og_def(p['lead'], '') -%}\n{%- set v_dishes = og_def(p['dishes'], none) -%}\n{%- set v_empty = og_def(p['empty'], '') -%}\n{%- set v_labels = og_def(p['labels'], none) -%}\n{%- set v_count = og_def(p['count'], 0) -%}\n{%- set v_media = og_def(p['media'], 'image') -%}\n{%- set v_tone = og_def(p['tone'], 'default') -%}\n{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}\n{%- set c_11 -%}\n  {%- if og_t(og_eq(og_len(v_dishes), 0)) %}\n    {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'shopping-bag', 'title': v_empty}}) }}\n  {%- else %}\n    {%- set c_10 -%}\n      {%- set c_1 -%}\n        {{ og_include('blocks/cart-count.html.j2', {'p': {'count': v_count, 'label': og_get(v_labels, ['inCart'])}}) }}\n      {%- endset -%}\n      {{ og_include('compose/group.html.j2', {'p': {'Justify': 'end'}, 'children': c_1}) }}\n      {%- set c_9 -%}\n        {%- for v_d in og_l(v_dishes) %}\n          {%- set c_8 -%}\n            {%- if og_t(og_eq(v_media, 'image')) %}\n              {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': og_get(v_d, ['name']), 'src': og_get(v_d, ['image'])}}) }}\n            {%- endif %}\n            {%- set c_6 -%}\n              {%- set c_4 -%}\n                {%- set c_2 -%}\n                  {{ og_text(og_get(v_d, ['name'])) }}\n                {%- endset -%}\n                {{ og_include('compose/text.html.j2', {'p': {'Size': 'base', 'Weight': 'semibold'}, 'children': c_2}) }}\n                {%- set c_3 -%}\n                  {{ og_text(og_get(v_d, ['weight'])) }}\n                {%- endset -%}\n                {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_3}) }}\n              {%- endset -%}\n              {{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Align': 'baseline', 'Justify': 'between'}, 'children': c_4}) }}\n              {%- set c_5 -%}\n                {{ og_text(og_money(og_get(v_d, ['price']), og_get(v_d, ['currency']))) }}\n              {%- endset -%}\n              {{ og_include('compose/text.html.j2', {'p': {'Size': 'lg', 'Weight': 'bold'}, 'children': c_5}) }}\n            {%- endset -%}\n            {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Class': og_s(('px-4' if og_t(og_eq(v_media, 'image')) else 'px-4 pt-4'))}, 'children': c_6}) }}\n            {%- set c_7 -%}\n              {{ og_include('blocks/add-qty.html.j2', {'p': {'name': og_tpl('{0}-qty-{1}', [v_id, og_get(v_d, ['id'])]), 'dish': og_get(v_d, ['name']), 'labels': v_labels}}) }}\n            {%- endset -%}\n            {{ og_include('compose/box.html.j2', {'p': {'Class': 'px-4'}, 'children': c_7}) }}\n          {%- endset -%}\n          {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Class': 'rounded bg-card inset-ring inset-ring-border overflow-hidden pb-4', 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_8}) }}\n        {%- endfor %}\n      {%- endset -%}\n      {{ og_include('compose/grid.html.j2', {'p': {'Cols': '1-3', 'Class': 'gap-4', 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_9}) }}\n    {%- endset -%}\n    {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch'}, 'children': c_10}) }}\n  {%- endif %}\n{%- endset -%}\n{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_11)}) }}\n",
      "path": "blocks/dish-cart-grid.html.j2",
      "target": "blocks/dish-cart-grid.html.j2"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "jinja2",
      "block"
    ]
  },
  "name": "dish-cart-grid",
  "registryDependencies": [
    "add-qty",
    "box",
    "cart-count",
    "empty-state",
    "grid",
    "group",
    "media-frame",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Dish Cart Grid",
  "type": "registry:block"
}
