{
  "$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<!--\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\" module>\n  import type { Snippet } from \"svelte\";\n  import type { Detail, Spec, ProductInfoLabels } from \"./product-info.types\";\n\n  export 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 lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Disclosure from \"../compose/Disclosure.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import List from \"../compose/List.svelte\";\n  import ListItem from \"../compose/ListItem.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Summary from \"../compose/Summary.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import Title from \"../compose/Title.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n\n  let {\n    id,\n    title,\n    details,\n    specs,\n    labels,\n    layout = \"split\",\n    expand = \"first\",\n    tone = \"default\",\n    landmarkLabel,\n  }: ProductInfoProps = $props();\n</script>\n\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    {#if ((details?.length ?? 0) > 0)}\n      <Stack\n        gap=\"0\"\n        align=\"stretch\"\n        class={(((layout as string) === \"split\") ? \"lg:col-span-2\" : \"\")}\n        data-slot=\"items\"\n      >\n        {#each details as d, i (d.id)}\n          <Disclosure variant=\"item\" open={(((expand as string) === \"first\") && (i === 0))} data-slot=\"item\">\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        {/each}\n      </Stack>\n    {/if}\n    {#if ((specs?.length ?? 0) > 0)}\n      <Stack gap=\"4\" align=\"stretch\" class=\"rounded bg-card inset-ring inset-ring-border p-6\" data-slot=\"specs\">\n        <Title as={3} size=\"lg\" weight=\"bold\">\n          {labels.specs}\n        </Title>\n        <List tag=\"ul\" class=\"flex flex-col\">\n          {#each specs as s (s.id)}\n            <ListItem\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          {/each}\n        </List>\n      </Stack>\n    {/if}\n  </Box>\n</SectionFrame>\n",
      "path": "blocks/product-info.svelte",
      "target": "blocks/product-info.svelte"
    },
    {
      "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"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "product",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "product-info",
  "registryDependencies": [
    "box",
    "disclosure",
    "inline",
    "list",
    "list-item",
    "section-frame",
    "stack",
    "summary",
    "text",
    "title",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Product Info",
  "type": "registry:block"
}
