{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Texts in an accordion beside a card of specs.",
  "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 Detail = {\n  id: string;\n  title: string;\n  text: string;\n};\n\nexport type Spec = {\n  id: string;\n  label: string;\n  value: string;\n};\n\nexport type ProductInfoLabels = {\n  specs: string;\n};\n",
      "path": "blocks/product-info.types.ts",
      "target": "blocks/product-info.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 details of a product under its buy box: texts in an accordion (native details) beside a card with the\n  specs. Axes: layout (split: the specs beside the texts, stacked: below them), expand (first: the first text\n  open, none), tone.\n-->\n<script lang=\"ts\">\nimport type { Detail, Spec, ProductInfoLabels } from \"./product-info.types\";\n\nexport type ProductInfoProps = {\n  id: string;\n  title: string;\n  details: Detail[];\n  specs: Spec[];\n  labels: ProductInfoLabels;\n  layout?: \"split\" | \"stacked\";\n  expand?: \"first\" | \"none\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Disclosure from \"../compose/Disclosure.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Summary from \"../compose/Summary.vue\";\nimport Text from \"../compose/Text.vue\";\nimport Title from \"../compose/Title.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\n\nconst {\n  id,\n  title,\n  details,\n  specs,\n  labels,\n  layout = \"split\",\n  expand = \"first\",\n  tone = \"default\",\n  landmarkLabel,\n} = defineProps<ProductInfoProps>();\n</script>\n\n<template>\n  <SectionFrame :id=\"id\" :title=\"title\" :tone=\"tone\" :landmarkLabel=\"landmarkLabel\">\n    <Box\n      :class=\"\n        (layout as string) === 'split' ? 'grid grid-cols-1 items-start gap-8 lg:grid-cols-3'\n        : 'grid grid-cols-1 gap-8'\n      \"\n    >\n      <Stack v-if=\"((details?.length ?? 0) > 0)\"\n        gap=\"0\"\n        align=\"stretch\"\n        :class=\"(((layout as string) === 'split') ? 'lg:col-span-2' : '')\"\n        data-slot=\"items\"\n      >\n        <Disclosure\n          v-for=\"(d, i) in details\"\n          :key=\"d.id\"\n          variant=\"item\"\n          :open=\"(((expand as string) === 'first') && (i === 0))\"\n          data-slot=\"item\"\n        >\n          <Summary variant=\"item\">\n            <Inline class=\"text-base font-semibold\">\n              {{ d.title }}\n            </Inline>\n          </Summary>\n          <Text size=\"sm\" class=\"pb-4 text-muted-foreground\">\n            {{ d.text }}\n          </Text>\n        </Disclosure>\n      </Stack>\n      <Stack\n        v-if=\"((specs?.length ?? 0) > 0)\"\n        gap=\"4\"\n        align=\"stretch\"\n        class=\"rounded bg-card inset-ring inset-ring-border p-6\"\n        data-slot=\"specs\"\n      >\n        <Title :as=\"3\" size=\"lg\" weight=\"bold\">\n          {{ labels.specs }}\n        </Title>\n        <List tag=\"ul\" class=\"flex flex-col\">\n          <ListItem v-for=\"s in specs\" :key=\"s.id\"\n            class=\"flex items-center justify-between gap-4 border-b border-border py-2 text-sm last:border-b-0\"\n            data-slot=\"spec\"\n          >\n            <Inline class=\"text-muted-foreground\">\n              {{ s.label }}\n            </Inline>\n            <Inline class=\"font-medium\">\n              {{ s.value }}\n            </Inline>\n          </ListItem>\n        </List>\n      </Stack>\n    </Box>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/product-info.vue",
      "target": "blocks/product-info.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "product",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "product-info",
  "registryDependencies": [
    "box",
    "disclosure",
    "inline",
    "list",
    "list-item",
    "section-frame",
    "stack",
    "summary",
    "text",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "Product Info",
  "type": "registry:block"
}
