{
  "$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-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { Dish, FoodLabels } from \"./dish-showcase.types\";\n\n  export 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</script>\n\n<script lang=\"ts\">\n  import Badge from \"../compose/Badge.svelte\";\n  import Box from \"../compose/Box.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import Link from \"../compose/Link.svelte\";\n  import LucideIcon from \"../icons/LucideIcon.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import Title from \"../compose/Title.svelte\";\n  import AddIcon from \"../components/add-icon.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import MediaFrame from \"../components/media-frame.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import { cn, fmtMoney, tpl, urlOf } from \"../utils\";\n\n  let {\n    id,\n    title,\n    lead = \"\",\n    dishes,\n    empty = \"\",\n    labels,\n    feature = \"start\",\n    tone = \"default\",\n    landmarkLabel,\n  }: DishBentoProps = $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=\"star\" title={empty} />\n  {:else}\n    <Box class=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\" data-slot=\"items\">\n      {#each dishes as d, i (d.id)}\n        {#if (i === 0)}\n          <Stack\n            gap=\"4\"\n            class={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\" class=\"w-fit\">\n              {d.weight}\n            </Badge>\n            <Title as={3} size=\"2xl\" weight=\"bold\">\n              {d.name}\n            </Title>\n            <Text size=\"base\" class=\"text-muted-foreground\">\n              {d.summary}\n            </Text>\n            <Group gap=\"4\" align=\"center\" justify=\"between\" class=\"mt-auto\">\n              <Inline class=\"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        {:else}\n          <Stack gap=\"2\" class=\"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 class=\"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        {/if}\n      {/each}\n    </Box>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/dish-bento.svelte",
      "target": "blocks/dish-bento.svelte"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "dish-bento",
  "registryDependencies": [
    "add-icon",
    "badge",
    "box",
    "dish-showcase",
    "empty-state",
    "group",
    "inline",
    "link",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Dish Bento",
  "type": "registry:block"
}
