{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Choose the meat, the weight and the sides of a grill (mangal) dish.",
  "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/grill-builder.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\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/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// GrillBuilderProps are the props of GrillBuilder; the values are the JSON shapes of the TypeScript props.\ntype GrillBuilderProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tLabels any `json:\"labels\"`\n\tMeats any `json:\"meats\"`\n\tWeights any `json:\"weights\"`\n\tSides any `json:\"sides\"`\n\tTotal any `json:\"total\"`\n\tCurrency any `json:\"currency\"`\n\tLayout any `json:\"layout\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A grill (mangal) dish builder: the meat as picture cards in a radio group, the weight as chips, the sides as checkboxes with prices, then a summary with the live total and the order button. Axes: layout (split, stacked), tone.\ntempl GrillBuilder(p GrillBuilderProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vLabels := p.Labels }}\n\t{{ vMeats := p.Meats }}\n\t{{ vWeights := p.Weights }}\n\t{{ vSides := p.Sides }}\n\t{{ vTotal := p.Total }}\n\t{{ vCurrency := p.Currency }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"split\") }}\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\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"grid grid-cols-1 items-start gap-8 lg:grid-cols-3\"}}) {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"flex flex-col gap-8 lg:col-span-2\", \"flex flex-col gap-8 lg:col-span-3\")), Attrs: uiutils.Attrs(\"data-slot\", \"steps\")}}) {\n\t\t\t\t@MeatCards(MeatCardsProps{Name: uiutils.Tpl(\"{0}-meat\", vId), Legend: uiutils.Get(vLabels, \"meat\"), Options: vMeats})\n\t\t\t\t@OptionChips(OptionChipsProps{Name: uiutils.Tpl(\"{0}-weight\", vId), Legend: uiutils.Get(vLabels, \"weight\"), Options: vWeights, Extra: \"note\"})\n\t\t\t\t@SideChecks(SideChecksProps{Name: uiutils.Tpl(\"{0}-sides\", vId), Legend: uiutils.Get(vLabels, \"sides\"), Options: vSides})\n\t\t\t}\n\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"rounded bg-card inset-ring inset-ring-border flex flex-col gap-4 p-6 lg:sticky lg:top-8\", \"rounded bg-card inset-ring inset-ring-border flex flex-col gap-4 p-6\")), Attrs: uiutils.Attrs(\"data-slot\", \"summary\")}}) {\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"lg\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"summary\")) }\n\t\t\t\t}\n\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"baseline\", Justify: \"between\", BoxProps: box.BoxProps{}}) {\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(vLabels, \"total\")) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-2xl font-bold\", Attrs: uiutils.Attrs(\"role\", \"status\", \"aria-live\", \"polite\", \"data-slot\", \"total\")}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Money(vTotal, vCurrency)) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"default\", Size: \"lg\", ButtonProps: button.ButtonProps{Type: \"button\", Class: \"w-full\"}}) {\n\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"shopping-bag\", Size: 16})\n\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"add\")) }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/grill-builder.templ",
      "target": "blocks/grill-builder.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "grill-builder",
  "registryDependencies": [
    "box",
    "button",
    "group",
    "inline",
    "kit-box",
    "kit-button",
    "kit-text",
    "lucide-icon",
    "meat-cards",
    "option-chips",
    "section-frame",
    "side-checks",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Grill Builder",
  "type": "registry:block"
}
