{
  "$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 = (p.id ?? null) -%}\n{%- set v_lines = (p.lines ?? null) -%}\n{%- set v_rows = (p.rows ?? null) -%}\n{%- set v_labels = (p.labels ?? null) -%}\n{%- set v_drawer = (p.drawer ?? null) -%}\n{%- set v_state = (p.state ?? 'filled') -%}\n{%- set v_media = (p.media ?? 'image') -%}\n{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}\n{%- set c_11 -%}\n  {%- set c_10 -%}\n    {%- set c_9 -%}\n      {%- set c_1 -%}\n        {{ include('compose/Box.html.twig', {'class': 'h-8 w-48 rounded bg-background'}, with_context = false) }}\n        {{ include('compose/Box.html.twig', {'class': 'h-40 rounded bg-background'}, with_context = false) }}\n        {{ include('compose/Box.html.twig', {'class': 'h-40 rounded bg-background'}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Box.html.twig', {'class': 'hidden flex-1 flex-col gap-4 p-8 sm:flex', 'attrs': og_attrs(['aria-hidden', 'true']), 'children': c_1}, with_context = false) }}\n      {%- set c_8 -%}\n        {%- set c_4 -%}\n          {%- set c_2 -%}\n            {{ og_text(og_get(v_drawer, ['title'])) }}\n          {%- endset -%}\n          {{ include('compose/Title.html.twig', {'as': 2, 'size': 'lg', 'weight': 'semibold', 'children': c_2}, with_context = false) }}\n          {%- set c_3 -%}\n            {{ include('icons/LucideIcon.html.twig', {'name': 'x', '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_drawer, ['close'])), 'children': c_3}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/Group.html.twig', {'gap': '4', 'align': 'center', 'justify': 'between', 'class': 'border-b border-border p-4', 'children': c_4}, with_context = false) }}\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              {{ include('compose/Button.html.twig', {'variant': 'outline', 'size': 'default', 'children': c_6}, with_context = false) }}\n            {%- endset -%}\n            {{ include('blocks/empty-state.html.twig', {'p': {'icon': 'shopping-bag', 'title': og_get(v_drawer, ['empty']), 'text': og_get(v_drawer, ['emptyText']), 'action': og_markup(f_5)}}, with_context = false) }}\n          {%- endset -%}\n          {{ include('compose/Box.html.twig', {'class': 'flex flex-1 flex-col justify-center p-4', 'attrs': og_attrs(['data-slot', 'empty']), 'children': c_7}, with_context = false) }}\n        {%- else %}\n          {{ include('blocks/drawer-lines.html.twig', {'p': {'field': og_tpl('{0}-qty', [v_id]), 'lines': v_lines, 'rows': v_rows, 'labels': v_labels, 'drawer': v_drawer, 'media': v_media}}, with_context = false) }}\n        {%- endif %}\n      {%- endset -%}\n      {{ include('compose/Box.html.twig', {'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}, with_context = false) }}\n    {%- endset -%}\n    {{ include('compose/Box.html.twig', {'class': 'flex min-h-160 overflow-hidden rounded bg-muted inset-ring inset-ring-border', 'children': c_9}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/Container.html.twig', {'class': 'mx-auto w-full max-w-6xl px-4', 'attrs': og_attrs(['data-slot', 'container']), 'children': c_10}, with_context = false) }}\n{%- endset -%}\n{{ include('compose/Block.html.twig', {'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}, with_context = false) }}\n",
      "path": "blocks/cart-drawer.html.twig",
      "target": "blocks/cart-drawer.html.twig"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "cart-drawer",
  "registryDependencies": [
    "block",
    "box",
    "button",
    "container",
    "drawer-lines",
    "empty-state",
    "group",
    "lucide-icon",
    "title",
    "utils"
  ],
  "runtime": "twig",
  "title": "Cart Drawer",
  "type": "registry:block"
}
