{
  "$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/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n\nexport type DrawerLabels = {\n  title: string;\n  close: string;\n  progress: string;\n  empty: string;\n  emptyText: string;\n  browse: string;\n};\n",
      "path": "blocks/cart-drawer.types.ts",
      "target": "blocks/cart-drawer.types.ts"
    },
    {
      "content": "<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->\n<!--\n  The cart drawer in its open state, over a faded page: the head with a close button, the lines with a quantity\n  field, the free-delivery bar, the totals and the button. The empty state shows an icon, a line and the way\n  back. Static markup: opening and closing are the page's. Axes: state (filled, empty), media (image, none).\n-->\n<script lang=\"ts\">\nimport type { DrawerLabels } from \"./cart-drawer.types\";\nimport type { CartLine, CartLabels } from \"./cart-list.types\";\nimport type { SummaryRow } from \"./order-summary.types\";\n\nexport type CartDrawerProps = {\n  id: string;\n  lines: CartLine[];\n  rows: SummaryRow[];\n  labels: CartLabels;\n  drawer: DrawerLabels;\n  state?: \"filled\" | \"empty\";\n  media?: \"image\" | \"none\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Block from \"../compose/Block.vue\";\nimport Box from \"../compose/Box.vue\";\nimport Button from \"../compose/Button.vue\";\nimport Container from \"../compose/Container.vue\";\nimport Group from \"../compose/Group.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport Title from \"../compose/Title.vue\";\nimport DrawerLines from \"../components/drawer-lines.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport { tpl } from \"../utils\";\n\nconst {\n  id,\n  lines,\n  rows,\n  labels,\n  drawer,\n  state = \"filled\",\n  media = \"image\",\n  landmarkLabel,\n} = defineProps<CartDrawerProps>();\n</script>\n\n<template>\n  <Block tag=\"section\" class=\"py-8\" :aria-label=\"(landmarkLabel ?? drawer.title)\" data-slot=\"section\">\n    <Container class=\"mx-auto w-full max-w-6xl px-4\" data-slot=\"container\">\n      <Box class=\"flex min-h-160 overflow-hidden rounded bg-muted inset-ring inset-ring-border\">\n        <Box class=\"hidden flex-1 flex-col gap-4 p-8 sm:flex\" aria-hidden=\"true\">\n          <Box class=\"h-8 w-48 rounded bg-background\" />\n          <Box class=\"h-40 rounded bg-background\" />\n          <Box class=\"h-40 rounded bg-background\" />\n        </Box>\n        <Box\n          class=\"flex w-full flex-col bg-background shadow-lg sm:max-w-sm\"\n          role=\"group\"\n          :aria-label=\"drawer.title\"\n          data-slot=\"drawer\"\n        >\n          <Group gap=\"4\" align=\"center\" justify=\"between\" class=\"border-b border-border p-4\">\n            <Title :as=\"2\" size=\"lg\" weight=\"semibold\">\n              {{ drawer.title }}\n            </Title>\n            <Button variant=\"ghost\" size=\"sm\" layout=\"icon\" :aria-label=\"drawer.close\">\n              <LucideIcon name=\"x\" :size=\"16\" />\n            </Button>\n          </Group>\n          <Box\n            v-if=\"(((state as string) === 'empty') || ((lines?.length ?? 0) === 0))\"\n            class=\"flex flex-1 flex-col justify-center p-4\"\n            data-slot=\"empty\"\n          >\n            <EmptyState icon=\"shopping-bag\" :title=\"drawer.empty\" :text=\"drawer.emptyText\">\n              <template #action>\n                <Button variant=\"outline\" size=\"default\">\n                  {{ drawer.browse }}\n                </Button>\n              </template>\n            </EmptyState>\n          </Box>\n          <DrawerLines v-else\n            :field=\"tpl('{0}-qty', id)\"\n            :lines=\"lines\"\n            :rows=\"rows\"\n            :labels=\"labels\"\n            :drawer=\"drawer\"\n            :media=\"media\"\n          />\n        </Box>\n      </Box>\n    </Container>\n  </Block>\n</template>\n",
      "path": "blocks/cart-drawer.vue",
      "target": "blocks/cart-drawer.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "cart-drawer",
  "registryDependencies": [
    "block",
    "box",
    "button",
    "cart-list",
    "container",
    "drawer-lines",
    "empty-state",
    "group",
    "lucide-icon",
    "order-summary",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "Cart Drawer",
  "type": "registry:block"
}
