{
  "$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\">\nimport type { DishOption } from \"./option-chips.types\";\n\nexport type MeatCardsProps = {\n  name: string;\n  legend: string;\n  options: DishOption[];\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Fieldset from \"../compose/Fieldset.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport Label from \"../compose/Label.vue\";\nimport Legend from \"../compose/Legend.vue\";\nimport Radio from \"../compose/Radio.vue\";\nimport MediaFrame from \"../components/media-frame.vue\";\nimport { fmtMoney, tpl } from \"../utils\";\n\nconst { name, legend, options } = defineProps<MeatCardsProps>();\n</script>\n\n<template>\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      <Box v-for=\"(o, i) in options\" :key=\"o.id\"\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    </Box>\n  </Fieldset>\n</template>\n",
      "path": "components/meat-cards.vue",
      "target": "components/meat-cards.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "meat-cards",
  "registryDependencies": [
    "box",
    "fieldset",
    "inline",
    "label",
    "legend",
    "media-frame",
    "option-chips",
    "radio",
    "utils"
  ],
  "runtime": "vue",
  "title": "Meat Cards",
  "type": "registry:component"
}
