{
  "$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/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/product-info.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/disclosure\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ProductInfoProps are the props of ProductInfo; the values are the JSON shapes of the TypeScript props.\ntype ProductInfoProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tDetails any `json:\"details\"`\n\tSpecs any `json:\"specs\"`\n\tLabels any `json:\"labels\"`\n\tLayout any `json:\"layout\"`\n\tExpand any `json:\"expand\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The details of a product under its buy box: texts in an accordion (native details) beside a card with the specs. Axes: layout (split: the specs beside the texts, stacked: below them), expand (first: the first text open, none), tone.\ntempl ProductInfo(p ProductInfoProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vDetails := p.Details }}\n\t{{ vSpecs := p.Specs }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"split\") }}\n\t{{ vExpand := uiutils.Def(p.Expand, \"first\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {\n\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"grid grid-cols-1 items-start gap-8 lg:grid-cols-3\", \"grid grid-cols-1 gap-8\"))}}) {\n\t\t\tif uiutils.Gt(uiutils.Len(vDetails), float64(0)) {\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", Align: \"stretch\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"lg:col-span-2\", \"\")), Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\tfor vI, vD := range uiutils.L(vDetails) {\n\t\t\t\t\t\t@compose.Disclosure(compose.DisclosureProps{Variant: \"item\", DisclosureProps: disclosure.DisclosureProps{Open: uiutils.T(uiutils.And(uiutils.Eq(vExpand, \"first\"), uiutils.Eq(float64(vI), float64(0)))), Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t@compose.Summary(compose.SummaryProps{Variant: \"item\", SummaryProps: disclosure.SummaryProps{}}) {\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-base font-semibold\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"title\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"pb-4 text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"text\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif uiutils.Gt(uiutils.Len(vSpecs), float64(0)) {\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Class: \"rounded bg-card inset-ring inset-ring-border p-6\", Attrs: uiutils.Attrs(\"data-slot\", \"specs\")}}) {\n\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"lg\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"specs\")) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ul\", Class: \"flex flex-col\"}}) {\n\t\t\t\t\t\tfor _, vS := range uiutils.L(vSpecs) {\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-center justify-between gap-4 border-b border-border py-2 text-sm last:border-b-0\", Attrs: uiutils.Attrs(\"data-slot\", \"spec\")}}) {\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"label\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"font-medium\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"value\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/product-info.templ",
      "target": "blocks/product-info.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "product",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "product-info",
  "registryDependencies": [
    "box",
    "disclosure",
    "inline",
    "kit-box",
    "kit-disclosure",
    "kit-text",
    "list",
    "list-item",
    "section-frame",
    "stack",
    "summary",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Product Info",
  "type": "registry:block"
}
