{
  "$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/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->\n<!--\n  Grill cuts side by side: an accessible table (caption, column and row headers) of the cut, weight, cooking\n  time, heat, marinade and price, or one compare card per cut with the same facts as a description list. Axes:\n  layout (table, cards), tone.\n-->\n<script lang=\"ts\">\nimport type { Dish, FoodLabels } from \"./dish-showcase.types\";\n\nexport type DishCompareProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  dishes: Dish[];\n  empty?: string;\n  labels: FoodLabels;\n  layout?: \"table\" | \"cards\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Table from \"../compose/Table.vue\";\nimport TableBody from \"../compose/TableBody.vue\";\nimport TableCaption from \"../compose/TableCaption.vue\";\nimport TableCell from \"../compose/TableCell.vue\";\nimport TableHead from \"../compose/TableHead.vue\";\nimport TableHeadCell from \"../compose/TableHeadCell.vue\";\nimport TableRow from \"../compose/TableRow.vue\";\nimport CutCards from \"../components/cut-cards.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { fmtMoney, tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  lead = \"\",\n  dishes,\n  empty = \"\",\n  labels,\n  layout = \"table\",\n  tone = \"default\",\n  landmarkLabel,\n} = defineProps<DishCompareProps>();\n</script>\n\n<template>\n  <SectionFrame :id=\"id\" :title=\"title\" :lead=\"lead\" :tone=\"tone\" :landmarkLabel=\"landmarkLabel\">\n    <EmptyState v-if=\"((dishes?.length ?? 0) === 0)\" icon=\"scale\" :title=\"empty\" />\n    <Box v-else-if=\"((layout as string) === 'table')\" class=\"w-full overflow-x-auto\" data-slot=\"compare-table\">\n      <Table class=\"w-full text-sm\">\n        <TableCaption class=\"sr-only\">\n          {{ labels.caption }}\n        </TableCaption>\n        <TableHead>\n          <TableRow>\n            <TableHeadCell scope=\"col\" class=\"py-2\">\n              {{ labels.cut }}\n            </TableHeadCell>\n            <TableHeadCell scope=\"col\" class=\"py-2\">\n              {{ labels.weight }}\n            </TableHeadCell>\n            <TableHeadCell scope=\"col\" class=\"py-2\">\n              {{ labels.minutes }}\n            </TableHeadCell>\n            <TableHeadCell scope=\"col\" class=\"py-2\">\n              {{ labels.heat }}\n            </TableHeadCell>\n            <TableHeadCell scope=\"col\" class=\"py-2\">\n              {{ labels.marinade }}\n            </TableHeadCell>\n            <TableHeadCell scope=\"col\" class=\"py-2\">\n              {{ labels.price }}\n            </TableHeadCell>\n          </TableRow>\n        </TableHead>\n        <TableBody>\n          <TableRow v-for=\"d in dishes\" :key=\"d.id\" data-slot=\"item\">\n            <TableHeadCell scope=\"row\" class=\"py-2 font-semibold\">\n              {{ d.name }}\n            </TableHeadCell>\n            <TableCell>\n              {{ d.weight }}\n            </TableCell>\n            <TableCell>\n              {{ tpl(labels.minutes, (d.minutes == null ? undefined : String(d.minutes))) }}\n            </TableCell>\n            <TableCell>\n              {{ d.tag }}\n            </TableCell>\n            <TableCell>\n              <template v-for=\"x in d.items\" :key=\"x\">\n                {{ x }}\n              </template>\n            </TableCell>\n            <TableCell class=\"font-semibold\">\n              {{ fmtMoney(d.price, d.currency) }}\n            </TableCell>\n          </TableRow>\n        </TableBody>\n      </Table>\n    </Box>\n    <CutCards v-else :dishes=\"dishes\" :labels=\"labels\" />\n  </SectionFrame>\n</template>\n",
      "path": "blocks/dish-compare.vue",
      "target": "blocks/dish-compare.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "dish-compare",
  "registryDependencies": [
    "box",
    "cut-cards",
    "dish-showcase",
    "empty-state",
    "section-frame",
    "table",
    "table-body",
    "table-caption",
    "table-cell",
    "table-head",
    "table-head-cell",
    "table-row",
    "utils"
  ],
  "runtime": "vue",
  "title": "Dish Compare",
  "type": "registry:block"
}
