{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Grill cuts side by side: a table or compare cards.",
  "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-compare.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\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// DishCompareProps are the props of DishCompare; the values are the JSON shapes of the TypeScript props.\ntype DishCompareProps 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\tLayout any `json:\"layout\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Grill cuts side by side: an accessible table (caption, column and row headers) of the cut, weight, cooking time, heat, marinade and price, or one compare card per cut with the same facts as a description list. Axes: layout (table, cards), tone.\ntempl DishCompare(p DishCompareProps) {\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{{ vLayout := uiutils.Def(p.Layout, \"table\") }}\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: \"scale\", Title: vEmpty})\n\t\t} else if uiutils.Eq(vLayout, \"table\") {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"w-full overflow-x-auto\", Attrs: uiutils.Attrs(\"data-slot\", \"compare-table\")}}) {\n\t\t\t\t@compose.Table(compose.TableProps{BoxProps: box.BoxProps{Class: \"w-full text-sm\"}}) {\n\t\t\t\t\t@compose.TableCaption(compose.TableCaptionProps{BoxProps: box.BoxProps{Class: \"sr-only\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"caption\")) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.TableHead(compose.TableHeadProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t@compose.TableRow(compose.TableRowProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-2\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"cut\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-2\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"weight\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-2\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"minutes\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-2\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"heat\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-2\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"marinade\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-2\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"price\")) }\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\t@compose.TableBody(compose.TableBodyProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\tfor _, vD := range uiutils.L(vDishes) {\n\t\t\t\t\t\t\t@compose.TableRow(compose.TableRowProps{BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-2 font-semibold\", Attrs: uiutils.Attrs(\"scope\", \"row\")}}) {\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.TableCell(compose.TableCellProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"weight\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.TableCell(compose.TableCellProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, \"minutes\"), uiutils.Str(uiutils.Get(vD, \"minutes\")))) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.TableCell(compose.TableCellProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vD, \"tag\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.TableCell(compose.TableCellProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\tfor _, vX := range uiutils.L(uiutils.Get(vD, \"items\")) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(vX) }\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\t@compose.TableCell(compose.TableCellProps{BoxProps: box.BoxProps{Class: \"font-semibold\"}}) {\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}\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} else {\n\t\t\t@CutCards(CutCardsProps{Dishes: vDishes, Labels: vLabels})\n\t\t}\n\t}\n}\n",
      "path": "blocks/dish-compare.templ",
      "target": "blocks/dish-compare.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "dish-compare",
  "registryDependencies": [
    "box",
    "cut-cards",
    "empty-state",
    "kit-box",
    "section-frame",
    "table",
    "table-body",
    "table-caption",
    "table-cell",
    "table-head",
    "table-head-cell",
    "table-row",
    "utils"
  ],
  "runtime": "templ",
  "title": "Dish Compare",
  "type": "registry:block"
}
