{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Compact rows with a one-click order button and a phone field.",
  "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  Quick order in one click: compact rows (name, weight, summary, price) each with an order button named after\n  the dish, under a phone field that the one click uses. Axes: phone (show, hide), 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 QuickOrderProps = {\n    id: string;\n    title: string;\n    lead?: string;\n    dishes: Dish[];\n    empty?: string;\n    labels: FoodLabels;\n    phone?: \"show\" | \"hide\";\n    tone?: \"default\" | \"muted\";\n    landmarkLabel?: string;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Button from \"../compose/Button.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import Input from \"../compose/Input.svelte\";\n  import List from \"../compose/List.svelte\";\n  import ListItem from \"../compose/ListItem.svelte\";\n  import LucideIcon from \"../icons/LucideIcon.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import Field from \"../components/field.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    phone = \"show\",\n    tone = \"default\",\n    landmarkLabel,\n  }: QuickOrderProps = $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=\"zap\" title={empty} />\n  {:else}\n    <Stack gap=\"4\" align=\"stretch\" class=\"mx-auto w-full max-w-3xl\">\n      {#if ((phone as string) === \"show\")}\n        <Field label={labels.phone} htmlFor={tpl(\"{0}-phone\", id)}>\n          <Input type=\"tel\" name={tpl(\"{0}-phone\", id)} id={tpl(\"{0}-phone\", id)} />\n        </Field>\n      {/if}\n      <List tag=\"ul\" class=\"flex flex-col\" data-slot=\"items\">\n        {#each dishes as d (d.id)}\n          <ListItem class=\"flex flex-wrap items-center gap-4 border-b border-border py-4\" data-slot=\"item\">\n            <Stack gap=\"0\" class=\"min-w-0 flex-1\">\n              <Group gap=\"2\" align=\"baseline\">\n                <Text size=\"base\" weight=\"semibold\">\n                  {d.name}\n                </Text>\n                <Text size=\"xs\" class=\"text-muted-foreground\">\n                  {d.weight}\n                </Text>\n              </Group>\n              <Text size=\"sm\" class=\"text-muted-foreground\">\n                {d.summary}\n              </Text>\n            </Stack>\n            <Inline class=\"text-base font-bold\">\n              {fmtMoney(d.price, d.currency)}\n            </Inline>\n            <Button variant=\"default\" size=\"sm\" type=\"button\" aria-label={tpl(labels.orderOf, d.name)}>\n              <LucideIcon name=\"zap\" size={16} />\n              {labels.order}\n            </Button>\n          </ListItem>\n        {/each}\n      </List>\n    </Stack>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/quick-order.svelte",
      "target": "blocks/quick-order.svelte"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "quick-order",
  "registryDependencies": [
    "button",
    "dish-showcase",
    "empty-state",
    "field",
    "group",
    "inline",
    "input",
    "list",
    "list-item",
    "lucide-icon",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Quick Order",
  "type": "registry:block"
}
