{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Customer reviews with ratings.",
  "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/review-list.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/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ReviewListProps are the props of ReviewList; the values are the JSON shapes of the TypeScript props.\ntype ReviewListProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tReviews any `json:\"reviews\"`\n\tLabels any `json:\"labels\"`\n\tLayout any `json:\"layout\"`\n\tItem any `json:\"item\"`\n\tAvatar any `json:\"avatar\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Customer reviews as cards or plain entries: rating, title, text, author and date. Axes: layout (list, grid), columns, item (card, plain), avatar (none, image), tone, density.\ntempl ReviewList(p ReviewListProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vReviews := p.Reviews }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"list\") }}\n\t{{ vItem := uiutils.Def(p.Item, \"card\") }}\n\t{{ vAvatar := uiutils.Def(p.Avatar, \"none\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, Measure: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"list\")), \"2xl\", \"default\"), LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Eq(uiutils.Len(vReviews), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"message-square-quote\", Title: uiutils.Get(vLabels, \"empty\")})\n\t\t}\n\t\t@compose.Grid(compose.GridProps{Cols: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"grid\")), \"1-3\", \"1\")), BoxProps: box.BoxProps{Class: \"gap-4\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\tfor _, vR := range uiutils.L(vReviews) {\n\t\t\t\t@ArticleBlock(ArticleBlockProps{Class: uiutils.Cnv(uiutils.Cnv(\"flex h-full flex-col gap-4\", uiutils.Cond(uiutils.T(uiutils.Eq(vItem, \"card\")), \"rounded bg-card p-6 inset-ring inset-ring-border\", \"border-b border-border pb-4\"))), Testid: \"item\"}) {\n\t\t\t\t\t@Rating(RatingProps{Value: uiutils.Get(vR, \"rating\"), Label: uiutils.Tpl(uiutils.Get(vLabels, \"ratingLabel\"), uiutils.Get(vR, \"rating\"))})\n\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"base\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vR, \"title\")) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vR, \"text\")) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", BoxProps: box.BoxProps{Class: \"mt-auto\"}}) {\n\t\t\t\t\t\tif uiutils.Eq(vAvatar, \"image\") {\n\t\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vR, \"author\"), Ratio: \"1/1\", Class: uiutils.Cnv(\"size-10 shrink-0 rounded-full\")})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vR, \"author\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vR, \"date\")) }\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/review-list.templ",
      "target": "blocks/review-list.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "product",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "review-list",
  "registryDependencies": [
    "article-block",
    "empty-state",
    "grid",
    "group",
    "kit-box",
    "kit-text",
    "media-frame",
    "rating",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Review List",
  "type": "registry:block"
}
