{
  "$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 = (p.id ?? null) -%}\n{%- set v_title = (p.title ?? null) -%}\n{%- set v_lines = (p.lines ?? null) -%}\n{%- set v_rows = (p.rows ?? null) -%}\n{%- set v_promos = (p.promos ?? null) -%}\n{%- set v_labels = (p.labels ?? null) -%}\n{%- set v_totals = (p.totals ?? null) -%}\n{%- set v_actions = (p.actions ?? null) -%}\n{%- set v_layout = (p.layout ?? 'split') -%}\n{%- set v_promo = (p.promo ?? 'show') -%}\n{%- set v_progress = (p.progress ?? 'show') -%}\n{%- set v_tone = (p.tone ?? 'default') -%}\n{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}\n{%- set c_14 -%}\n  {%- set c_13 -%}\n    {%- set c_11 -%}\n      {%- if og_t(og_eq(og_len(v_lines), 0)) %}\n        {{ include('blocks/empty-state.html.twig', {'p': {'icon': 'shopping-cart', 'title': og_get(v_actions, ['empty'])}}, with_context = false) }}\n      {%- endif %}\n      {%- for v_line in og_l(v_lines) %}\n        {%- set c_7 -%}\n          {{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_line, ['name']), 'src': og_get(v_line, ['image']), 'ratio': '1/1', 'className': og_cnv(['size-20 shrink-0'])}}, with_context = false) }}\n          {%- set c_4 -%}\n            {%- set c_1 -%}\n              {{ og_text(og_get(v_line, ['name'])) }}\n            {%- endset -%}\n            {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_1}, with_context = false) }}\n            {%- set c_2 -%}\n              {{ og_text(og_get(v_line, ['variant'])) }}\n            {%- endset -%}\n            {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}\n            {%- set c_3 -%}\n              {{ og_text(og_money(og_get(v_line, ['price']), og_get(v_line, ['currency']))) }}\n            {%- endset -%}\n            {{ include('compose/Text.html.twig', {'size': 'sm', 'children': c_3}, with_context = false) }}\n          {%- endset -%}\n          {{ include('compose/Stack.html.twig', {'gap': '0', 'class': 'min-w-40 flex-1', 'children': c_4}, with_context = false) }}\n          {{ include('blocks/number-field.html.twig', {'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'])}}, with_context = false) }}\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          {{ include('compose/Text.html.twig', {'size': 'base', 'weight': 'bold', 'class': 'w-24 text-right', 'children': c_5}, with_context = false) }}\n          {%- set c_6 -%}\n            {{ include('icons/LucideIcon.html.twig', {'name': 'trash', 'size': 16}, with_context = false) }}\n          {%- endset -%}\n          {{ include('compose/Button.html.twig', {'variant': 'ghost', 'size': 'sm', 'layout': 'icon', 'ariaLabel': og_s(og_get(v_labels, ['remove'])), 'children': c_6}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/Group.html.twig', {'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}, with_context = false) }}\n      {%- endfor %}\n      {%- set c_10 -%}\n        {%- set c_8 -%}\n          {{ include('icons/LucideIcon.html.twig', {'name': 'arrow-left', 'size': 16}, with_context = false) }}\n          {{ og_text(og_get(v_actions, ['back'])) }}\n        {%- endset -%}\n        {{ include('compose/Button.html.twig', {'variant': 'outline', 'size': 'default', 'children': c_8}, with_context = false) }}\n        {%- set c_9 -%}\n          {{ og_text(og_get(v_actions, ['clear'])) }}\n        {%- endset -%}\n        {{ include('compose/Button.html.twig', {'variant': 'ghost', 'size': 'default', 'children': c_9}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Group.html.twig', {'gap': '4', 'justify': 'between', 'class': 'flex-wrap', 'children': c_10}, with_context = false) }}\n    {%- endset -%}\n    {{ include('compose/Stack.html.twig', {'gap': '4', 'align': 'stretch', 'class': og_s((og_t(og_eq(v_layout, 'split')) ? 'lg:col-span-2' : '')), 'attrs': og_attrs(['data-slot', 'lines']), 'children': c_11}, with_context = false) }}\n    {%- set c_12 -%}\n      {{ include('blocks/cart-summary-card.html.twig', {'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}}, with_context = false) }}\n    {%- endset -%}\n    {{ include('compose/Box.html.twig', {'class': og_s((og_t(og_eq(v_layout, 'split')) ? 'lg:sticky lg:top-8' : '')), 'attrs': og_attrs(['data-slot', 'aside']), 'children': c_12}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/Box.html.twig', {'class': og_s((og_t(og_eq(v_layout, 'split')) ? 'grid grid-cols-1 items-start gap-8 lg:grid-cols-3' : 'grid grid-cols-1 gap-8')), 'children': c_13}, with_context = false) }}\n{%- endset -%}\n{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_14)}, with_context = false) }}\n",
      "path": "blocks/shopping-cart.html.twig",
      "target": "blocks/shopping-cart.html.twig"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "twig",
      "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": "twig",
  "title": "Shopping Cart",
  "type": "registry:block"
}
