{
  "$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 = (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_items = (p.items ?? 'hide') -%}\n{%- set v_promo = (p.promo ?? 'show') -%}\n{%- set v_field = (p.field ?? 'promo') -%}\n{%- set v_progress = (p.progress ?? 'show') -%}\n{%- set v_value = (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    {{ include('compose/Title.html.twig', {'as': 2, 'size': 'lg', 'weight': 'semibold', 'children': c_1}, with_context = false) }}\n    {%- set c_2 -%}\n      {{ og_text(og_tpl(og_get(v_labels, ['items']), [og_str(og_len(v_lines))])) }}\n    {%- endset -%}\n    {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/Group.html.twig', {'gap': '4', 'align': 'baseline', 'justify': 'between', 'children': c_3}, with_context = false) }}\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          {{ 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-12 shrink-0'])}}, with_context = false) }}\n          {%- set c_6 -%}\n            {%- set c_4 -%}\n              {{ og_text(og_get(v_line, ['name'])) }}\n            {%- endset -%}\n            {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_4}, with_context = false) }}\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            {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_5}, with_context = false) }}\n          {%- endset -%}\n          {{ include('compose/Stack.html.twig', {'gap': '0', 'class': 'flex-1', 'children': c_6}, with_context = false) }}\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          {{ include('compose/Inline.html.twig', {'class': 'font-medium', 'children': c_7}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/ListItem.html.twig', {'class': 'flex items-center gap-4 text-sm', 'attrs': og_attrs(['data-slot', 'cart-line']), 'children': c_8}, with_context = false) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ include('compose/List.html.twig', {'tag': 'ul', 'class': 'flex flex-col gap-4', 'attrs': og_attrs(['data-slot', 'summary-lines']), 'children': c_9}, with_context = false) }}\n  {%- endif %}\n  {%- if og_t(og_eq(v_promo, 'show')) %}\n    {%- set c_15 -%}\n      {%- set c_11 -%}\n        {{ include('compose/Input.html.twig', {'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'])])}, with_context = false) }}\n        {%- set c_10 -%}\n          {{ og_text(og_get(v_labels, ['apply'])) }}\n        {%- endset -%}\n        {{ include('compose/Button.html.twig', {'variant': 'outline', 'size': 'default', 'type': 'button', 'children': c_10}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'children': c_11}, with_context = false) }}\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          {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_12}, with_context = false) }}\n          {%- for v_c in og_l(v_promos) %}\n            {%- set c_13 -%}\n              {{ og_text(og_get(v_c, ['code'])) }}\n            {%- endset -%}\n            {{ include('compose/Badge.html.twig', {'variant': 'outline', 'size': 'sm', 'children': c_13}, with_context = false) }}\n          {%- endfor %}\n        {%- endset -%}\n        {{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'class': 'flex-wrap', 'children': c_14}, with_context = false) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/Stack.html.twig', {'gap': '2', 'align': 'stretch', 'attrs': og_attrs(['data-slot', 'promo']), 'children': c_15}, with_context = false) }}\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      {{ include('compose/Text.html.twig', {'size': 'sm', 'children': c_16}, with_context = false) }}\n      {{ include('compose/Progress.html.twig', {'value': og_s(og_str(v_value)), 'max': '100', 'attrs': og_attrs(['aria-label', og_get(v_labels, ['progress'])])}, with_context = false) }}\n    {%- endset -%}\n    {{ include('compose/Stack.html.twig', {'gap': '2', 'align': 'stretch', 'class': 'rounded bg-muted p-4', 'attrs': og_attrs(['data-slot', 'progress']), 'children': c_17}, with_context = false) }}\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          {{ include('compose/Inline.html.twig', {'children': c_18}, with_context = false) }}\n          {%- set c_19 -%}\n            {{ og_text(og_money(og_get(v_row, ['amount']), og_get(v_row, ['currency']))) }}\n          {%- endset -%}\n          {{ include('compose/Inline.html.twig', {'children': c_19}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/ListItem.html.twig', {'class': og_s(og_cnv(['flex items-center justify-between gap-4', (og_t(og_get(v_row, ['strong'])) ? 'border-t border-border pt-4 text-base font-bold' : 'text-sm text-muted-foreground')])), 'attrs': og_attrs(['data-slot', 'row']), 'children': c_20}, with_context = false) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ include('compose/List.html.twig', {'tag': 'ul', 'class': 'flex flex-col gap-2', 'children': c_21}, with_context = false) }}\n  {%- endif %}\n  {%- set c_22 -%}\n    {{ og_text(og_get(v_labels, ['checkout'])) }}\n  {%- endset -%}\n  {{ include('compose/Button.html.twig', {'variant': 'default', 'size': 'lg', 'class': 'w-full', 'children': c_22}, with_context = false) }}\n  {%- set c_23 -%}\n    {{ og_text(og_get(v_labels, ['note'])) }}\n  {%- endset -%}\n  {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_23}, with_context = false) }}\n{%- endset -%}\n{{ include('compose/Stack.html.twig', {'gap': '6', 'align': 'stretch', 'class': 'rounded bg-card inset-ring inset-ring-border p-6', 'attrs': og_attrs(['data-slot', 'summary']), 'children': c_24}, with_context = false) }}\n",
      "path": "blocks/cart-summary-card.html.twig",
      "target": "blocks/cart-summary-card.html.twig"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "twig",
      "component"
    ]
  },
  "name": "cart-summary-card",
  "registryDependencies": [
    "badge",
    "button",
    "group",
    "inline",
    "input",
    "list",
    "list-item",
    "media-frame",
    "progress",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "twig",
  "title": "Cart Summary Card",
  "type": "registry:component"
}
