{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Menu sections with dotted leaders to the price; no cart.",
  "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/restaurant-menu.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// RestaurantMenuProps are the props of RestaurantMenu; the values are the JSON shapes of the TypeScript props.\ntype RestaurantMenuProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tDishes any `json:\"dishes\"`\n\tSections any `json:\"sections\"`\n\tEmpty any `json:\"empty\"`\n\tLabels any `json:\"labels\"`\n\tCols any `json:\"cols\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A restaurant menu by sections: a nav of section links, then each section (heading and note) with its dishes as menu lines (name, a dotted leader, the price; the summary and weight below). No cart. Axes: cols (1, 2), tone.\ntempl RestaurantMenu(p RestaurantMenuProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vDishes := p.Dishes }}\n\t{{ vSections := p.Sections }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLabels := p.Labels }}\n\t{{ vCols := uiutils.Def(p.Cols, \"1\") }}\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(vSections), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"star\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Stack(compose.StackProps{Gap: \"8\", Align: \"stretch\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vCols, \"1\")), \"mx-auto w-full max-w-3xl\", \"\"))}}) {\n\t\t\t\t@MenuSectionNav(MenuSectionNavProps{Label: uiutils.Get(vLabels, \"sections\"), Sections: vSections, Prefix: vId, LandmarkLabel: vLandmarkLabel})\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vCols, \"2\")), \"grid grid-cols-1 gap-8 md:grid-cols-2\", \"flex flex-col gap-8\")), Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\tfor _, vS := range uiutils.L(vSections) {\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"id\", uiutils.Tpl(\"{0}-{1}\", vId, uiutils.Get(vS, \"key\")), \"data-slot\", \"menusection\")}}) {\n\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", BoxProps: box.BoxProps{Class: \"border-b border-border pb-2\"}}) {\n\t\t\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"xl\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"title\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\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\t\t\t{ uiutils.Text(uiutils.Get(vS, \"note\")) }\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.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ul\", Class: \"flex flex-col gap-4\"}}) {\n\t\t\t\t\t\t\t\tfor _, vD := range uiutils.L(vDishes) {\n\t\t\t\t\t\t\t\t\tif uiutils.T(uiutils.Eq(uiutils.Get(vD, \"tag\"), uiutils.Get(vS, \"key\"))) {\n\t\t\t\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex flex-col gap-0\", Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex items-baseline gap-2\"}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"font-semibold\"}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"name\")) }\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif uiutils.T(uiutils.Get(vD, \"badge\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t@compose.Badge(compose.BadgeProps{Variant: \"outline\", Size: \"sm\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"badge\")) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"flex-1 border-b border-dotted border-border\", Attrs: uiutils.Attrs(\"aria-hidden\", \"true\")}})\n\t\t\t\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"font-semibold\"}}) {\n\t\t\t\t\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\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\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\t\t\t\t\t\t{ uiutils.Text(uiutils.Tpl(\"{0} · {1}\", uiutils.Get(vD, \"summary\"), uiutils.Get(vD, \"weight\"))) }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\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/restaurant-menu.templ",
      "target": "blocks/restaurant-menu.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "restaurant-menu",
  "registryDependencies": [
    "badge",
    "box",
    "empty-state",
    "inline",
    "kit-box",
    "kit-text",
    "list",
    "list-item",
    "menu-section-nav",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Restaurant Menu",
  "type": "registry:block"
}
