{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Pizza cards with a size and a crust radio group and an add button.",
  "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/pizza-picker.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/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// PizzaPickerProps are the props of PizzaPicker; the values are the JSON shapes of the TypeScript props.\ntype PizzaPickerProps 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\tSizes any `json:\"sizes\"`\n\tCrusts any `json:\"crusts\"`\n\tLayout any `json:\"layout\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Pizzas with a picker on each card: the picture, name and toppings, a radio group of sizes and one of crusts (each a fieldset with role radiogroup), the price and an add button. Axes: layout (cards, rows), tone.\ntempl PizzaPicker(p PizzaPickerProps) {\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{{ vSizes := p.Sizes }}\n\t{{ vCrusts := p.Crusts }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"cards\") }}\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: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"rows\")), \"flex flex-col gap-4\", \"grid grid-cols-1 gap-4 md:grid-cols-3\")), Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\tfor _, vD := range uiutils.L(vDishes) {\n\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"rows\")), \"rounded bg-card inset-ring inset-ring-border grid grid-cols-1 gap-4 p-4 md:grid-cols-3\", \"rounded bg-card inset-ring inset-ring-border flex flex-col gap-4 p-4\")), Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vD, \"name\"), Src: uiutils.Get(vD, \"image\"), Ratio: \"1/1\"})\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"rows\")), \"md:col-span-2\", \"\"))}}) {\n\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"lg\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"name\")) }\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(vD, \"summary\")) }\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@OptionChips(OptionChipsProps{Name: uiutils.Tpl(\"{0}-size-{1}\", vId, uiutils.Get(vD, \"id\")), Legend: uiutils.Get(vLabels, \"size\"), Options: vSizes})\n\t\t\t\t\t\t\t@OptionChips(OptionChipsProps{Name: uiutils.Tpl(\"{0}-crust-{1}\", vId, uiutils.Get(vD, \"id\")), Legend: uiutils.Get(vLabels, \"crust\"), Options: vCrusts})\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.Button(compose.ButtonProps{Variant: \"default\", Size: \"default\", ButtonProps: button.ButtonProps{Type: \"button\", AriaLabel: uiutils.S(uiutils.Tpl(uiutils.Get(vLabels, \"addOf\"), uiutils.Get(vD, \"name\")))}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"add\")) }\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/pizza-picker.templ",
      "target": "blocks/pizza-picker.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "pizza-picker",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "group",
    "inline",
    "kit-box",
    "kit-button",
    "kit-text",
    "media-frame",
    "option-chips",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Pizza Picker",
  "type": "registry:block"
}
