{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "One featured dish in a large tile among smaller ones.",
  "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 * Featured dishes as a bento: the first dish in a large tile (two by two) with its summary and a link to its\n * page, the others in small tiles around it. Axes: feature (start, end), tone.\n */\nimport { Fragment, type ReactNode } from \"react\";\nimport { Badge, Box, Group, Inline, Link, Stack, Text, Title } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { AddIcon } from \"../components/add-icon\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { MediaFrame } from \"../components/media-frame\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { cn, fmtMoney, tpl, urlOf } from \"../utils\";\nimport type { Dish, FoodLabels } from \"./dish-showcase.types\";\n\nexport type DishBentoProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  dishes: Dish[];\n  empty?: string;\n  labels: FoodLabels;\n  feature?: \"start\" | \"end\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n\nexport function DishBento({\n  id,\n  title,\n  lead = \"\",\n  dishes,\n  empty = \"\",\n  labels,\n  feature = \"start\",\n  tone = \"default\",\n  landmarkLabel,\n}: DishBentoProps) {\n  return (\n    <SectionFrame id={id} title={title} lead={lead} tone={tone} landmarkLabel={landmarkLabel}>\n      {((dishes?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"star\" title={empty} />\n      ) : (\n        <Box className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\" data-slot=\"items\">\n          {(dishes ?? []).map((d, i) => (\n            <Fragment key={d.id}>\n              {(i === 0) ? (\n                <Stack\n                  gap=\"4\"\n                  className={cn(\n                    \"rounded bg-card inset-ring inset-ring-border p-6 sm:col-span-2 lg:row-span-2\",\n                    (((feature as string) === \"end\") ? \"lg:col-start-3 lg:row-start-1\" : \"\")\n                  )}\n                  data-slot=\"feature\"\n                >\n                  <MediaFrame alt={d.name} src={d.image} ratio=\"4/3\" />\n                  <Badge variant=\"secondary\" size=\"default\" className=\"w-fit\">\n                    {d.weight}\n                  </Badge>\n                  <Title as={3} size=\"2xl\" weight=\"bold\">\n                    {d.name}\n                  </Title>\n                  <Text size=\"base\" className=\"text-muted-foreground\">\n                    {d.summary}\n                  </Text>\n                  <Group gap=\"4\" align=\"center\" justify=\"between\" className=\"mt-auto\">\n                    <Inline className=\"text-xl font-bold\">\n                      {fmtMoney(d.price, d.currency)}\n                    </Inline>\n                    <Link href={urlOf((d.href ?? tpl(\"#/dish/{0}\", d.id)))} variant=\"default\">\n                      {labels.open}\n                      <LucideIcon name=\"arrow-right\" size={16} />\n                    </Link>\n                  </Group>\n                </Stack>\n              ) : (\n                <Stack gap=\"2\" className=\"rounded bg-card inset-ring inset-ring-border p-4\" data-slot=\"item\">\n                  <MediaFrame alt={d.name} src={d.image} />\n                  <Text size=\"sm\" weight=\"semibold\">\n                    {d.name}\n                  </Text>\n                  <Group gap=\"2\" align=\"center\" justify=\"between\">\n                    <Inline className=\"text-sm font-bold\">\n                      {fmtMoney(d.price, d.currency)}\n                    </Inline>\n                    <AddIcon label={tpl(labels.addOf, d.name)} />\n                  </Group>\n                </Stack>\n              )}\n            </Fragment>\n          ))}\n        </Box>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/dish-bento.tsx",
      "target": "blocks/dish-bento.tsx"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "dish-bento",
  "registryDependencies": [
    "add-icon",
    "compose",
    "dish-showcase",
    "empty-state",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "utils"
  ],
  "runtime": "react",
  "title": "Dish Bento",
  "type": "registry:block"
}
