{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The cart lines beside a summary with a promo code and a free-delivery bar.",
  "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/shopping-cart.json\n    The cart as a page: the lines as cards (picture, name, variant, price, quantity, line total, remove) with the way back, beside the order summary with a promo code and the free-delivery bar. Static markup. Axes: layout (split: the summary beside the lines, stacked: below them), promo (show, hide), progress (show, hide), tone.\n    Props (p): id, title, lines, rows, promos, labels, totals, actions, layout, promo, progress, tone, landmarkLabel. -#}\n{%- set v_id = og_def(p['id'], none) -%}\n{%- set v_title = og_def(p['title'], none) -%}\n{%- set v_lines = og_def(p['lines'], none) -%}\n{%- set v_rows = og_def(p['rows'], none) -%}\n{%- set v_promos = og_def(p['promos'], none) -%}\n{%- set v_labels = og_def(p['labels'], none) -%}\n{%- set v_totals = og_def(p['totals'], none) -%}\n{%- set v_actions = og_def(p['actions'], none) -%}\n{%- set v_layout = og_def(p['layout'], 'split') -%}\n{%- set v_promo = og_def(p['promo'], 'show') -%}\n{%- set v_progress = og_def(p['progress'], 'show') -%}\n{%- set v_tone = og_def(p['tone'], 'default') -%}\n{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}\n{%- set c_14 -%}\n  {%- set c_13 -%}\n    {%- set c_11 -%}\n      {%- if og_t(og_eq(og_len(v_lines), 0)) %}\n        {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'shopping-cart', 'title': og_get(v_actions, ['empty'])}}) }}\n      {%- endif %}\n      {%- for v_line in og_l(v_lines) %}\n        {%- set c_7 -%}\n          {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': og_get(v_line, ['name']), 'src': og_get(v_line, ['image']), 'ratio': '1/1', 'className': og_cnv(['size-20 shrink-0'])}}) }}\n          {%- set c_4 -%}\n            {%- set c_1 -%}\n              {{ og_text(og_get(v_line, ['name'])) }}\n            {%- endset -%}\n            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_1}) }}\n            {%- set c_2 -%}\n              {{ og_text(og_get(v_line, ['variant'])) }}\n            {%- endset -%}\n            {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}\n            {%- set c_3 -%}\n              {{ og_text(og_money(og_get(v_line, ['price']), og_get(v_line, ['currency']))) }}\n            {%- endset -%}\n            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm'}, 'children': c_3}) }}\n          {%- endset -%}\n          {{ og_include('compose/stack.html.j2', {'p': {'Gap': '0', 'Class': 'min-w-40 flex-1'}, 'children': c_4}) }}\n          {{ og_include('blocks/number-field.html.j2', {'p': {'value': og_str(og_get(v_line, ['qty'])), 'name': og_tpl('{0}-qty-{1}', [v_id, og_get(v_line, ['id'])]), 'min': '1', 'label': og_get(v_labels, ['qty']), 'decrease': og_get(v_labels, ['decrease']), 'increase': og_get(v_labels, ['increase'])}}) }}\n          {%- set c_5 -%}\n            {{ og_text(og_money(og_mul(og_get(v_line, ['price']), og_get(v_line, ['qty'])), og_get(v_line, ['currency']))) }}\n          {%- endset -%}\n          {{ og_include('compose/text.html.j2', {'p': {'Size': 'base', 'Weight': 'bold', 'Class': 'w-24 text-right'}, 'children': c_5}) }}\n          {%- set c_6 -%}\n            {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'trash', 'Size': 16}}) }}\n          {%- endset -%}\n          {{ og_include('compose/button.html.j2', {'p': {'Variant': 'ghost', 'Size': 'sm', 'Layout': 'icon', 'AriaLabel': og_s(og_get(v_labels, ['remove']))}, 'children': c_6}) }}\n        {%- endset -%}\n        {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Class': 'rounded bg-card inset-ring inset-ring-border flex-wrap p-4', 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_7}) }}\n      {%- endfor %}\n      {%- set c_10 -%}\n        {%- set c_8 -%}\n          {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'arrow-left', 'Size': 16}}) }}\n          {{ og_text(og_get(v_actions, ['back'])) }}\n        {%- endset -%}\n        {{ og_include('compose/button.html.j2', {'p': {'Variant': 'outline', 'Size': 'default'}, 'children': c_8}) }}\n        {%- set c_9 -%}\n          {{ og_text(og_get(v_actions, ['clear'])) }}\n        {%- endset -%}\n        {{ og_include('compose/button.html.j2', {'p': {'Variant': 'ghost', 'Size': 'default'}, 'children': c_9}) }}\n      {%- endset -%}\n      {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Justify': 'between', 'Class': 'flex-wrap'}, 'children': c_10}) }}\n    {%- endset -%}\n    {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Class': og_s(('lg:col-span-2' if og_t(og_eq(v_layout, 'split')) else '')), 'Attrs': og_attrs(['data-slot', 'lines'])}, 'children': c_11}) }}\n    {%- set c_12 -%}\n      {{ og_include('blocks/cart-summary-card.html.j2', {'p': {'field': og_tpl('{0}-promo', [v_id]), 'lines': v_lines, 'rows': v_rows, 'promos': v_promos, 'labels': v_totals, 'promo': v_promo, 'progress': v_progress}}) }}\n    {%- endset -%}\n    {{ og_include('compose/box.html.j2', {'p': {'Class': og_s(('lg:sticky lg:top-8' if og_t(og_eq(v_layout, 'split')) else '')), 'Attrs': og_attrs(['data-slot', 'aside'])}, 'children': c_12}) }}\n  {%- endset -%}\n  {{ og_include('compose/box.html.j2', {'p': {'Class': og_s(('grid grid-cols-1 items-start gap-8 lg:grid-cols-3' if og_t(og_eq(v_layout, 'split')) else 'grid grid-cols-1 gap-8'))}, 'children': c_13}) }}\n{%- endset -%}\n{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_14)}) }}\n",
      "path": "blocks/shopping-cart.html.j2",
      "target": "blocks/shopping-cart.html.j2"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "jinja2",
      "block"
    ]
  },
  "name": "shopping-cart",
  "registryDependencies": [
    "box",
    "button",
    "cart-summary-card",
    "empty-state",
    "group",
    "lucide-icon",
    "media-frame",
    "number-field",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Shopping Cart",
  "type": "registry:block"
}
