{
  "$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 */\nimport { For, type JSX } from \"solid-js\";\nimport { Button, Group, Inline, Input, List, ListItem, Stack, Text } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { Field } from \"../components/field\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { fmtMoney, tpl } from \"../utils\";\nimport type { Dish, FoodLabels } from \"./dish-showcase.types\";\n\nexport 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\nexport function QuickOrder({\n  id,\n  title,\n  lead = \"\",\n  dishes,\n  empty = \"\",\n  labels,\n  phone = \"show\",\n  tone = \"default\",\n  landmarkLabel,\n}: QuickOrderProps) {\n  return (\n    <SectionFrame id={id} title={title} lead={lead} tone={tone} landmarkLabel={landmarkLabel}>\n      {((dishes?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"zap\" title={empty} />\n      ) : (\n        <Stack gap=\"4\" align=\"stretch\" class=\"mx-auto w-full max-w-3xl\">\n          {((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          ) : null}\n          <List tag=\"ul\" class=\"flex flex-col\" data-slot=\"items\">\n            <For each={dishes ?? []}>{(d) => (\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            )}</For>\n          </List>\n        </Stack>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/quick-order.tsx",
      "target": "blocks/quick-order.tsx"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "quick-order",
  "registryDependencies": [
    "compose",
    "dish-showcase",
    "empty-state",
    "field",
    "lucide-icon",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Quick Order",
  "type": "registry:block"
}
