{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The meat of a grill dish as picture cards in one radio group (fieldset with role radiogroup named by its legend): a picture, the name and the price per 500 g; the first checked.",
  "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 * The meat of a grill dish as picture cards in one radio group (fieldset with role radiogroup named by its\n * legend): a picture, the name and the price per 500 g; the first checked.\n */\nimport { type ReactNode } from \"react\";\nimport { Box, Fieldset, Inline, Label, Legend, Radio } from \"../compose\";\nimport { MediaFrame } from \"../components/media-frame\";\nimport { fmtMoney, tpl } from \"../utils\";\nimport type { DishOption } from \"./option-chips.types\";\n\nexport type MeatCardsProps = {\n  name: string;\n  legend: string;\n  options: DishOption[];\n};\n\nexport function MeatCards({ name, legend, options }: MeatCardsProps) {\n  return (\n    <Fieldset\n      className=\"flex flex-col gap-2\"\n      role=\"radiogroup\"\n      aria-labelledby={tpl(\"{0}-legend\", name)}\n      data-slot=\"meat\"\n    >\n      <Legend size=\"sm\" className=\"mb-2\" id={tpl(\"{0}-legend\", name)}>\n        {legend}\n      </Legend>\n      <Box className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n        {(options ?? []).map((o, i) => (\n          <Box key={o.id}\n            className={\"flex flex-col gap-2 rounded p-2 text-sm inset-ring inset-ring-border has-checked:bg-muted \" +\n              \"has-checked:inset-ring-foreground\"}\n            data-slot=\"option\"\n          >\n            <MediaFrame alt={o.name} src={o.image} ratio=\"4/3\" />\n            <Label className=\"flex items-center gap-2 font-medium\">\n              <Radio name={name} value={o.id} checked={(i === 0)} />\n              <Inline>\n                {o.name}\n              </Inline>\n            </Label>\n            <Inline className=\"text-xs text-muted-foreground\">\n              {tpl(\"{0} · {1}\", fmtMoney(o.price, o.currency), o.note)}\n            </Inline>\n          </Box>\n        ))}\n      </Box>\n    </Fieldset>\n  );\n}\n",
      "path": "components/meat-cards.tsx",
      "target": "components/meat-cards.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "meat-cards",
  "registryDependencies": [
    "compose",
    "media-frame",
    "option-chips",
    "utils"
  ],
  "runtime": "react",
  "title": "Meat Cards",
  "type": "registry:component"
}
