{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Category sections with DishCards in a grid, or denser menu rows; prices can be hidden.",
  "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/menu-board.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// MenuBoardProps are the props of MenuBoard; the values are the JSON shapes of the TypeScript props.\ntype MenuBoardProps 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\tLayout any `json:\"layout\"`\n\tPrices any `json:\"prices\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A restaurant menu board: category sections with DishCards in a grid, or denser menu rows in a list or a sectioned column. Axes: layout (sections, grid, list), prices (show, hide), density. Composes DishCard; section rows use MenuRow.\ntempl MenuBoard(p MenuBoardProps) {\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{{ vLayout := uiutils.Def(p.Layout, \"sections\") }}\n\t{{ vPrices := uiutils.Def(p.Prices, \"show\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Density: vDensity, 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{}}) {\n\t\t\t\tif uiutils.Eq(vLayout, \"sections\") {\n\t\t\t\t\t@MenuSectionNav(MenuSectionNavProps{Label: uiutils.Get(vLabels, \"sections\"), Sections: vSections, Prefix: vId, LandmarkLabel: vLandmarkLabel})\n\t\t\t\t}\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"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: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"2\", \"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\tif uiutils.Eq(vLayout, \"grid\") {\n\t\t\t\t\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-3\", BoxProps: box.BoxProps{Class: \"gap-4\"}}) {\n\t\t\t\t\t\t\t\t\tfor _, vD := range uiutils.L(vDishes) {\n\t\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\t@DishCard(DishCardProps{Dish: vD, Labels: map[string]any{\"add\": uiutils.Get(vLabels, \"add\")}, Media: uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"none\", \"image\"), Prices: vPrices, Action: \"none\", Density: vDensity})\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} else {\n\t\t\t\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ul\", Class: \"flex flex-col\"}}) {\n\t\t\t\t\t\t\t\t\tfor _, vD := range uiutils.L(vDishes) {\n\t\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\t@MenuRow(MenuRowProps{Dish: vD, Prices: vPrices})\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/menu-board.templ",
      "target": "blocks/menu-board.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "restaurant",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "menu-board",
  "registryDependencies": [
    "box",
    "dish-card",
    "empty-state",
    "grid",
    "kit-box",
    "kit-text",
    "list",
    "menu-row",
    "menu-section-nav",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Menu Board",
  "type": "registry:block"
}
