{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Meat Cards component",
  "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-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { DishOption } from \"./option-chips.types\";\n\n  export type MeatCardsProps = {\n    name: string;\n    legend: string;\n    options: DishOption[];\n  };\n</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Fieldset from \"../compose/Fieldset.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import Label from \"../compose/Label.svelte\";\n  import Legend from \"../compose/Legend.svelte\";\n  import Radio from \"../compose/Radio.svelte\";\n  import MediaFrame from \"../components/media-frame.svelte\";\n  import { fmtMoney, tpl } from \"../utils\";\n\n  let { name, legend, options }: MeatCardsProps = $props();\n</script>\n\n<Fieldset\n  class=\"flex flex-col gap-2\"\n  role=\"radiogroup\"\n  aria-labelledby={tpl(\"{0}-legend\", name)}\n  data-slot=\"meat\"\n>\n  <Legend size=\"sm\" class=\"mb-2\" id={tpl(\"{0}-legend\", name)}>\n    {legend}\n  </Legend>\n  <Box class=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n    {#each options as o, i (o.id)}\n      <Box\n        class={\"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 class=\"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 class=\"text-xs text-muted-foreground\">\n          {tpl(\"{0} · {1}\", fmtMoney(o.price, o.currency), o.note)}\n        </Inline>\n      </Box>\n    {/each}\n  </Box>\n</Fieldset>\n",
      "path": "components/meat-cards.svelte",
      "target": "components/meat-cards.svelte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "meat-cards",
  "registryDependencies": [
    "box",
    "fieldset",
    "inline",
    "label",
    "legend",
    "media-frame",
    "option-chips",
    "radio",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Meat Cards",
  "type": "registry:component"
}
