{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The cart drawer in its open state, filled or empty.",
  "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-drawer.json\n    The cart drawer in its open state, over a faded page: the head with a close button, the lines with a quantity field, the free-delivery bar, the totals and the button. The empty state shows an icon, a line and the way back. Static markup: opening and closing are the page's. Axes: state (filled, empty), media (image, none).\n    Props (p): id, lines, rows, labels, drawer, state, media, landmarkLabel. -#}\n{%- set v_id = og_def(p['id'], none) -%}\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_state = og_def(p['state'], 'filled') -%}\n{%- set v_media = og_def(p['media'], 'image') -%}\n{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}\n{%- set c_11 -%}\n  {%- set c_10 -%}\n    {%- set c_9 -%}\n      {%- set c_1 -%}\n        {{ og_include('compose/box.html.j2', {'p': {'Class': 'h-8 w-48 rounded bg-background'}}) }}\n        {{ og_include('compose/box.html.j2', {'p': {'Class': 'h-40 rounded bg-background'}}) }}\n        {{ og_include('compose/box.html.j2', {'p': {'Class': 'h-40 rounded bg-background'}}) }}\n      {%- endset -%}\n      {{ og_include('compose/box.html.j2', {'p': {'Class': 'hidden flex-1 flex-col gap-4 p-8 sm:flex', 'Attrs': og_attrs(['aria-hidden', 'true'])}, 'children': c_1}) }}\n      {%- set c_8 -%}\n        {%- set c_4 -%}\n          {%- set c_2 -%}\n            {{ og_text(og_get(v_drawer, ['title'])) }}\n          {%- endset -%}\n          {{ og_include('compose/title.html.j2', {'p': {'As': 2, 'Size': 'lg', 'Weight': 'semibold'}, 'children': c_2}) }}\n          {%- set c_3 -%}\n            {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'x', 'Size': 16}}) }}\n          {%- endset -%}\n          {{ og_include('compose/button.html.j2', {'p': {'Variant': 'ghost', 'Size': 'sm', 'Layout': 'icon', 'AriaLabel': og_s(og_get(v_drawer, ['close']))}, 'children': c_3}) }}\n        {%- endset -%}\n        {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between', 'Class': 'border-b border-border p-4'}, 'children': c_4}) }}\n        {%- if og_t(og_or([og_eq(v_state, 'empty'), og_eq(og_len(v_lines), 0)])) %}\n          {%- set c_7 -%}\n            {%- set f_5 -%}\n              {%- set c_6 -%}\n                {{ og_text(og_get(v_drawer, ['browse'])) }}\n              {%- endset -%}\n              {{ og_include('compose/button.html.j2', {'p': {'Variant': 'outline', 'Size': 'default'}, 'children': c_6}) }}\n            {%- endset -%}\n            {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'shopping-bag', 'title': og_get(v_drawer, ['empty']), 'text': og_get(v_drawer, ['emptyText']), 'action': og_markup(f_5)}}) }}\n          {%- endset -%}\n          {{ og_include('compose/box.html.j2', {'p': {'Class': 'flex flex-1 flex-col justify-center p-4', 'Attrs': og_attrs(['data-slot', 'empty'])}, 'children': c_7}) }}\n        {%- else %}\n          {{ og_include('blocks/drawer-lines.html.j2', {'p': {'field': og_tpl('{0}-qty', [v_id]), 'lines': v_lines, 'rows': v_rows, 'labels': v_labels, 'drawer': v_drawer, 'media': v_media}}) }}\n        {%- endif %}\n      {%- endset -%}\n      {{ og_include('compose/box.html.j2', {'p': {'Class': 'flex w-full flex-col bg-background shadow-lg sm:max-w-sm', 'Attrs': og_attrs(['role', 'group', 'aria-label', og_get(v_drawer, ['title']), 'data-slot', 'drawer'])}, 'children': c_8}) }}\n    {%- endset -%}\n    {{ og_include('compose/box.html.j2', {'p': {'Class': 'flex min-h-160 overflow-hidden rounded bg-muted inset-ring inset-ring-border'}, 'children': c_9}) }}\n  {%- endset -%}\n  {{ og_include('compose/container.html.j2', {'p': {'Class': 'mx-auto w-full max-w-6xl px-4', 'Attrs': og_attrs(['data-slot', 'container'])}, 'children': c_10}) }}\n{%- endset -%}\n{{ og_include('compose/block.html.j2', {'p': {'Tag': 'section', 'Class': 'py-8', 'Attrs': og_attrs(['aria-label', og_coalesce([v_landmarkLabel, og_get(v_drawer, ['title'])]), 'data-slot', 'section'])}, 'children': c_11}) }}\n",
      "path": "blocks/cart-drawer.html.j2",
      "target": "blocks/cart-drawer.html.j2"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "jinja2",
      "block"
    ]
  },
  "name": "cart-drawer",
  "registryDependencies": [
    "block",
    "box",
    "button",
    "container",
    "drawer-lines",
    "empty-state",
    "group",
    "lucide-icon",
    "title",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Cart Drawer",
  "type": "registry:block"
}
