{
  "$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 */\nimport { For, type JSX } from \"solid-js\";\nimport { Box, Disclosure, Inline, List, ListItem, Stack, Summary, Text, Title } from \"../compose\";\nimport { SectionFrame } from \"../components/section-frame\";\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\nexport function ProductInfo({\n  id,\n  title,\n  details,\n  specs,\n  labels,\n  layout = \"split\",\n  expand = \"first\",\n  tone = \"default\",\n  landmarkLabel,\n}: ProductInfoProps) {\n  return (\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        {((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            <For each={details ?? []}>{(d, iOf) => { const i = iOf(); return (\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            ); }}</For>\n          </Stack>\n        ) : null}\n        {((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              <For each={specs ?? []}>{(s) => (\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              )}</For>\n            </List>\n          </Stack>\n        ) : null}\n      </Box>\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/product-info.tsx",
      "target": "blocks/product-info.tsx"
    },
    {
      "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": [
      "solid",
      "block"
    ]
  },
  "name": "product-info",
  "registryDependencies": [
    "compose",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Product Info",
  "type": "registry:block"
}
