{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The order summary card of the cart page and the checkout: the lines in short (optional), a promo code field with ready codes, the free-delivery progress, the totals, the button and a note. Static markup.",
  "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/cart-summary-card.json\n    The order summary card of the cart page and the checkout: the lines in short (optional), a promo code field with ready codes, the free-delivery progress, the totals, the button and a note. Static markup.\n    Props (p): lines, rows, promos, labels, items, promo, field, progress, value. -#}\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_items = og_def(p['items'], 'hide') -%}\n{%- set v_promo = og_def(p['promo'], 'show') -%}\n{%- set v_field = og_def(p['field'], 'promo') -%}\n{%- set v_progress = og_def(p['progress'], 'show') -%}\n{%- set v_value = og_def(p['value'], 70) -%}\n{%- set c_24 -%}\n  {%- set c_3 -%}\n    {%- set c_1 -%}\n      {{ og_text(og_get(v_labels, ['title'])) }}\n    {%- endset -%}\n    {{ og_include('compose/title.html.j2', {'p': {'As': 2, 'Size': 'lg', 'Weight': 'semibold'}, 'children': c_1}) }}\n    {%- set c_2 -%}\n      {{ og_text(og_tpl(og_get(v_labels, ['items']), [og_str(og_len(v_lines))])) }}\n    {%- endset -%}\n    {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}\n  {%- endset -%}\n  {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'baseline', 'Justify': 'between'}, 'children': c_3}) }}\n  {%- if og_t(og_and([og_eq(v_items, 'show'), og_gt(og_len(v_lines), 0)])) %}\n    {%- set c_9 -%}\n      {%- for v_line in og_l(v_lines) %}\n        {%- set c_8 -%}\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-12 shrink-0'])}}) }}\n          {%- set c_6 -%}\n            {%- set c_4 -%}\n              {{ og_text(og_get(v_line, ['name'])) }}\n            {%- endset -%}\n            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_4}) }}\n            {%- set c_5 -%}\n              {{ og_text(og_tpl('{0} x {1}', [og_get(v_line, ['qty']), og_money(og_get(v_line, ['price']), og_get(v_line, ['currency']))])) }}\n            {%- endset -%}\n            {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_5}) }}\n          {%- endset -%}\n          {{ og_include('compose/stack.html.j2', {'p': {'Gap': '0', 'Class': 'flex-1'}, 'children': c_6}) }}\n          {%- set c_7 -%}\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/inline.html.j2', {'p': {'Class': 'font-medium'}, 'children': c_7}) }}\n        {%- endset -%}\n        {{ og_include('compose/list-item.html.j2', {'p': {'Class': 'flex items-center gap-4 text-sm', 'Attrs': og_attrs(['data-slot', 'cart-line'])}, 'children': c_8}) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ og_include('compose/list.html.j2', {'p': {'Tag': 'ul', 'Class': 'flex flex-col gap-4', 'Attrs': og_attrs(['data-slot', 'summary-lines'])}, 'children': c_9}) }}\n  {%- endif %}\n  {%- if og_t(og_eq(v_promo, 'show')) %}\n    {%- set c_15 -%}\n      {%- set c_11 -%}\n        {{ og_include('compose/input.html.j2', {'p': {'Type': 'text', 'Name': og_s(v_field), 'Placeholder': og_s(og_get(v_labels, ['promo'])), 'Class': 'min-w-0 flex-1', 'Attrs': og_attrs(['aria-label', og_get(v_labels, ['promo'])])}}) }}\n        {%- set c_10 -%}\n          {{ og_text(og_get(v_labels, ['apply'])) }}\n        {%- endset -%}\n        {{ og_include('compose/button.html.j2', {'p': {'Variant': 'outline', 'Size': 'default', 'Type': 'button'}, 'children': c_10}) }}\n      {%- endset -%}\n      {{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Align': 'center'}, 'children': c_11}) }}\n      {%- if og_t(og_gt(og_len(v_promos), 0)) %}\n        {%- set c_14 -%}\n          {%- set c_12 -%}\n            {{ og_text(og_get(v_labels, ['codes'])) }}\n          {%- endset -%}\n          {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_12}) }}\n          {%- for v_c in og_l(v_promos) %}\n            {%- set c_13 -%}\n              {{ og_text(og_get(v_c, ['code'])) }}\n            {%- endset -%}\n            {{ og_include('compose/badge.html.j2', {'p': {'Variant': 'outline', 'Size': 'sm'}, 'children': c_13}) }}\n          {%- endfor %}\n        {%- endset -%}\n        {{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Align': 'center', 'Class': 'flex-wrap'}, 'children': c_14}) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Align': 'stretch', 'Attrs': og_attrs(['data-slot', 'promo'])}, 'children': c_15}) }}\n  {%- endif %}\n  {%- if og_t(og_eq(v_progress, 'show')) %}\n    {%- set c_17 -%}\n      {%- set c_16 -%}\n        {{ og_text(og_get(v_labels, ['progress'])) }}\n      {%- endset -%}\n      {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm'}, 'children': c_16}) }}\n      {{ og_include('compose/progress.html.j2', {'p': {'Value': og_s(og_str(v_value)), 'Max': '100', 'Attrs': og_attrs(['aria-label', og_get(v_labels, ['progress'])])}}) }}\n    {%- endset -%}\n    {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Align': 'stretch', 'Class': 'rounded bg-muted p-4', 'Attrs': og_attrs(['data-slot', 'progress'])}, 'children': c_17}) }}\n  {%- endif %}\n  {%- if og_t(og_gt(og_len(v_rows), 0)) %}\n    {%- set c_21 -%}\n      {%- for v_row in og_l(v_rows) %}\n        {%- set c_20 -%}\n          {%- set c_18 -%}\n            {{ og_text(og_get(v_row, ['label'])) }}\n          {%- endset -%}\n          {{ og_include('compose/inline.html.j2', {'p': {}, 'children': c_18}) }}\n          {%- set c_19 -%}\n            {{ og_text(og_money(og_get(v_row, ['amount']), og_get(v_row, ['currency']))) }}\n          {%- endset -%}\n          {{ og_include('compose/inline.html.j2', {'p': {}, 'children': c_19}) }}\n        {%- endset -%}\n        {{ og_include('compose/list-item.html.j2', {'p': {'Class': og_s(og_cnv(['flex items-center justify-between gap-4', ('border-t border-border pt-4 text-base font-bold' if og_t(og_get(v_row, ['strong'])) else 'text-sm text-muted-foreground')])), 'Attrs': og_attrs(['data-slot', 'row'])}, 'children': c_20}) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ og_include('compose/list.html.j2', {'p': {'Tag': 'ul', 'Class': 'flex flex-col gap-2'}, 'children': c_21}) }}\n  {%- endif %}\n  {%- set c_22 -%}\n    {{ og_text(og_get(v_labels, ['checkout'])) }}\n  {%- endset -%}\n  {{ og_include('compose/button.html.j2', {'p': {'Variant': 'default', 'Size': 'lg', 'Class': 'w-full'}, 'children': c_22}) }}\n  {%- set c_23 -%}\n    {{ og_text(og_get(v_labels, ['note'])) }}\n  {%- endset -%}\n  {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_23}) }}\n{%- endset -%}\n{{ og_include('compose/stack.html.j2', {'p': {'Gap': '6', 'Align': 'stretch', 'Class': 'rounded bg-card inset-ring inset-ring-border p-6', 'Attrs': og_attrs(['data-slot', 'summary'])}, 'children': c_24}) }}\n",
      "path": "blocks/cart-summary-card.html.j2",
      "target": "blocks/cart-summary-card.html.j2"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "jinja2",
      "component"
    ]
  },
  "name": "cart-summary-card",
  "registryDependencies": [
    "badge",
    "button",
    "group",
    "inline",
    "input",
    "list",
    "list-item",
    "media-frame",
    "progress",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Cart Summary Card",
  "type": "registry:component"
}
