{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The filled body of the CartDrawer: the lines with a quantity field, then the free-delivery bar, the subtotal and total and the button.",
  "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/drawer-lines.json\n    The filled body of the CartDrawer: the lines with a quantity field, then the free-delivery bar, the subtotal and total and the button.\n    Props (p): lines, rows, labels, drawer, media, field. -#}\n{%- set v_lines = og_def(p['lines'], none) -%}\n{%- set v_rows = og_def(p['rows'], none) -%}\n{%- set v_labels = og_def(p['labels'], none) -%}\n{%- set v_drawer = og_def(p['drawer'], none) -%}\n{%- set v_media = og_def(p['media'], 'image') -%}\n{%- set v_field = og_def(p['field'], 'qty') -%}\n{%- set c_7 -%}\n  {%- for v_line in og_l(v_lines) %}\n    {%- set c_6 -%}\n      {%- if og_t(og_eq(v_media, 'image')) %}\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-16 shrink-0'])}}) }}\n      {%- endif %}\n      {%- set c_5 -%}\n        {%- set c_3 -%}\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_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': 'text-sm font-medium'}, 'children': c_2}) }}\n        {%- endset -%}\n        {{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Justify': 'between', 'Align': 'start'}, 'children': c_3}) }}\n        {%- set c_4 -%}\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_4}) }}\n        {{ og_include('blocks/number-field.html.j2', {'p': {'value': og_str(og_get(v_line, ['qty'])), 'name': og_tpl('{0}-{1}', [v_field, 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      {%- endset -%}\n      {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Align': 'stretch', 'Class': 'flex-1'}, 'children': c_5}) }}\n    {%- endset -%}\n    {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'start', 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_6}) }}\n  {%- endfor %}\n{%- endset -%}\n{{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Class': 'flex-1 p-4', 'Attrs': og_attrs(['data-slot', 'lines'])}, 'children': c_7}) }}\n{%- set c_15 -%}\n  {%- set c_9 -%}\n    {%- set c_8 -%}\n      {{ og_text(og_get(v_drawer, ['progress'])) }}\n    {%- endset -%}\n    {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm'}, 'children': c_8}) }}\n    {{ og_include('compose/progress.html.j2', {'p': {'Value': '96', 'Max': '100', 'Attrs': og_attrs(['aria-label', og_get(v_drawer, ['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_9}) }}\n  {%- set c_13 -%}\n    {%- for v_row in og_l(v_rows) %}\n      {%- set v_i = loop.index0 -%}\n      {%- if og_t((true if og_t(og_get(v_row, ['strong'])) else og_eq(v_i, 0))) %}\n        {%- set c_12 -%}\n          {%- set c_10 -%}\n            {{ og_text(og_get(v_row, ['label'])) }}\n          {%- endset -%}\n          {{ og_include('compose/inline.html.j2', {'p': {}, 'children': c_10}) }}\n          {%- set c_11 -%}\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_11}) }}\n        {%- endset -%}\n        {{ og_include('compose/list-item.html.j2', {'p': {'Class': og_s(('flex justify-between text-base font-bold' if og_t(og_get(v_row, ['strong'])) else 'flex justify-between text-sm text-muted-foreground')), 'Attrs': og_attrs(['data-slot', 'summary-row'])}, 'children': c_12}) }}\n      {%- endif %}\n    {%- endfor %}\n  {%- endset -%}\n  {{ og_include('compose/list.html.j2', {'p': {'Tag': 'ul', 'Class': 'flex flex-col gap-2'}, 'children': c_13}) }}\n  {%- set c_14 -%}\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_14}) }}\n{%- endset -%}\n{{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Class': 'border-t border-border p-4', 'Attrs': og_attrs(['data-slot', 'drawer-lines'])}, 'children': c_15}) }}\n",
      "path": "blocks/drawer-lines.html.j2",
      "target": "blocks/drawer-lines.html.j2"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "jinja2",
      "component"
    ]
  },
  "name": "drawer-lines",
  "registryDependencies": [
    "button",
    "group",
    "inline",
    "list",
    "list-item",
    "media-frame",
    "number-field",
    "progress",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Drawer Lines",
  "type": "registry:component"
}
