{
  "$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\" module>\n  import type { Snippet } from \"svelte\";\n  import type { Dish, FoodLabels } from \"./dish-showcase.types\";\n\n  export 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 lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Table from \"../compose/Table.svelte\";\n  import TableBody from \"../compose/TableBody.svelte\";\n  import TableCaption from \"../compose/TableCaption.svelte\";\n  import TableCell from \"../compose/TableCell.svelte\";\n  import TableHead from \"../compose/TableHead.svelte\";\n  import TableHeadCell from \"../compose/TableHeadCell.svelte\";\n  import TableRow from \"../compose/TableRow.svelte\";\n  import CutCards from \"../components/cut-cards.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import { fmtMoney, tpl } from \"../utils\";\n\n  let {\n    id,\n    title,\n    lead = \"\",\n    dishes,\n    empty = \"\",\n    labels,\n    layout = \"table\",\n    tone = \"default\",\n    landmarkLabel,\n  }: DishCompareProps = $props();\n</script>\n\n<SectionFrame id={id} title={title} lead={lead} tone={tone} landmarkLabel={landmarkLabel}>\n  {#if ((dishes?.length ?? 0) === 0)}\n    <EmptyState icon=\"scale\" title={empty} />\n  {:else if ((layout as string) === \"table\")}\n    <Box 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          {#each dishes as d (d.id)}\n            <TableRow 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                {#each d.items as x (x)}\n                  {x}\n                {/each}\n              </TableCell>\n              <TableCell class=\"font-semibold\">\n                {fmtMoney(d.price, d.currency)}\n              </TableCell>\n            </TableRow>\n          {/each}\n        </TableBody>\n      </Table>\n    </Box>\n  {:else}\n    <CutCards dishes={dishes} labels={labels} />\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/dish-compare.svelte",
      "target": "blocks/dish-compare.svelte"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "svelte",
      "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": "svelte",
  "title": "Dish Compare",
  "type": "registry:block"
}
