{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "One featured dish in a large tile among smaller ones.",
  "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/dish-bento.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/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/link\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// DishBentoProps are the props of DishBento; the values are the JSON shapes of the TypeScript props.\ntype DishBentoProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tDishes any `json:\"dishes\"`\n\tEmpty any `json:\"empty\"`\n\tLabels any `json:\"labels\"`\n\tFeature any `json:\"feature\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Featured dishes as a bento: the first dish in a large tile (two by two) with its summary and a link to its page, the others in small tiles around it. Axes: feature (start, end), tone.\ntempl DishBento(p DishBentoProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vDishes := p.Dishes }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLabels := p.Labels }}\n\t{{ vFeature := uiutils.Def(p.Feature, \"start\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Eq(uiutils.Len(vDishes), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"star\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\tfor vI, vD := range uiutils.L(vDishes) {\n\t\t\t\t\tif uiutils.Eq(float64(vI), float64(0)) {\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"rounded bg-card inset-ring inset-ring-border p-6 sm:col-span-2 lg:row-span-2\", uiutils.Cond(uiutils.T(uiutils.Eq(vFeature, \"end\")), \"lg:col-start-3 lg:row-start-1\", \"\"))), Attrs: uiutils.Attrs(\"data-slot\", \"feature\")}}) {\n\t\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vD, \"name\"), Src: uiutils.Get(vD, \"image\"), Ratio: \"4/3\"})\n\t\t\t\t\t\t\t@compose.Badge(compose.BadgeProps{Variant: \"secondary\", Size: \"default\", TextProps: text.TextProps{Class: \"w-fit\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"weight\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"2xl\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"name\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"base\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"summary\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", Justify: \"between\", BoxProps: box.BoxProps{Class: \"mt-auto\"}}) {\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-xl font-bold\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Money(uiutils.Get(vD, \"price\"), uiutils.Get(vD, \"currency\"))) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Link(compose.LinkProps{Variant: \"default\", LinkProps: link.LinkProps{Href: uiutils.URL(uiutils.Coalesce(uiutils.Get(vD, \"href\"), uiutils.Tpl(\"#/dish/{0}\", uiutils.Get(vD, \"id\"))), false)}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"open\")) }\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"arrow-right\", Size: 16})\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} else {\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", BoxProps: box.BoxProps{Class: \"rounded bg-card inset-ring inset-ring-border p-4\", Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vD, \"name\"), Src: uiutils.Get(vD, \"image\")})\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(vD, \"name\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"center\", Justify: \"between\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-sm font-bold\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Money(uiutils.Get(vD, \"price\"), uiutils.Get(vD, \"currency\"))) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@AddIcon(AddIconProps{Label: uiutils.Tpl(uiutils.Get(vLabels, \"addOf\"), uiutils.Get(vD, \"name\"))})\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/dish-bento.templ",
      "target": "blocks/dish-bento.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "dish-bento",
  "registryDependencies": [
    "add-icon",
    "badge",
    "box",
    "empty-state",
    "group",
    "inline",
    "kit-box",
    "kit-link",
    "kit-text",
    "link",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Dish Bento",
  "type": "registry:block"
}
