{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A dish as a card: picture, category, portion/weight, price and an order button. No rating.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n    Source: packages/compose-gen/specs/organisms/dish-card.json\n    A dish as a card: picture, optional badge, category, name, portion/weight, summary, price and an order button. No rating. Axes: layout (vertical, horizontal), media (image, none), density, action (button, none). Records map from Codex kind `dish`.\n    Props (p): dish, labels, layout, media, prices, action, density. -#}\n{%- set v_dish = (p.dish ?? null) -%}\n{%- set v_labels = (p.labels ?? null) -%}\n{%- set v_layout = (p.layout ?? 'vertical') -%}\n{%- set v_media = (p.media ?? 'image') -%}\n{%- set v_prices = (p.prices ?? 'show') -%}\n{%- set v_action = (p.action ?? 'button') -%}\n{%- set v_density = (p.density ?? 'default') -%}\n{%- set c_14 -%}\n  {%- if og_t(og_eq(v_media, 'image')) %}\n    {%- set c_2 -%}\n      {{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_dish, ['name']), 'src': og_get(v_dish, ['image']), 'ratio': '4/3', 'className': og_cnv(['h-full'])}}, with_context = false) }}\n      {%- if og_t(og_get(v_dish, ['badge'])) %}\n        {%- set c_1 -%}\n          {{ og_text(og_get(v_dish, ['badge'])) }}\n        {%- endset -%}\n        {{ include('compose/Badge.html.twig', {'variant': 'default', 'size': 'default', 'class': 'absolute left-4 top-4', 'children': c_1}, with_context = false) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['relative shrink-0', (og_t(og_eq(v_layout, 'horizontal')) ? 'sm:w-48' : '')])), 'children': c_2}, with_context = false) }}\n  {%- endif %}\n  {%- set c_13 -%}\n    {%- set c_5 -%}\n      {%- set c_3 -%}\n        {{ og_text(og_get(v_dish, ['tag'])) }}\n      {%- endset -%}\n      {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'uppercase tracking-wide text-muted-foreground', 'attrs': og_attrs(['data-slot', 'category']), 'children': c_3}, with_context = false) }}\n      {%- if og_t(og_eq(v_media, 'none')) %}\n        {%- if og_t(og_get(v_dish, ['badge'])) %}\n          {%- set c_4 -%}\n            {{ og_text(og_get(v_dish, ['badge'])) }}\n          {%- endset -%}\n          {{ include('compose/Badge.html.twig', {'variant': 'secondary', 'size': 'sm', 'children': c_4}, with_context = false) }}\n        {%- endif %}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'class': 'flex-wrap', 'children': c_5}, with_context = false) }}\n    {%- set c_7 -%}\n      {%- if og_t(og_get(v_dish, ['href'])) %}\n        {%- set c_6 -%}\n          {{ og_text(og_get(v_dish, ['name'])) }}\n        {%- endset -%}\n        {{ include('compose/Link.html.twig', {'href': og_url(og_s(og_get(v_dish, ['href']))), 'variant': 'default', 'attrs': og_attrs(['data-slot', 'open']), 'children': c_6}, with_context = false) }}\n      {%- else %}\n        {{ og_text(og_get(v_dish, ['name'])) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/Title.html.twig', {'as': 3, 'size': 'base', 'weight': 'bold', 'children': c_7}, with_context = false) }}\n    {%- if og_t(og_get(v_dish, ['weight'])) %}\n      {%- set c_8 -%}\n        {{ og_text(og_get(v_dish, ['weight'])) }}\n      {%- endset -%}\n      {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'attrs': og_attrs(['data-slot', 'portion']), 'children': c_8}, with_context = false) }}\n    {%- endif %}\n    {%- if og_t(og_eq(v_density, 'default')) %}\n      {%- set c_9 -%}\n        {{ og_text(og_get(v_dish, ['summary'])) }}\n      {%- endset -%}\n      {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_9}, with_context = false) }}\n    {%- endif %}\n    {%- set c_12 -%}\n      {%- if og_t(og_eq(v_prices, 'show')) %}\n        {%- set c_10 -%}\n          {{ og_text(og_money(og_get(v_dish, ['price']), og_get(v_dish, ['currency']))) }}\n        {%- endset -%}\n        {{ include('compose/Text.html.twig', {'size': 'xl', 'weight': 'bold', 'attrs': og_attrs(['data-slot', 'price']), 'children': c_10}, with_context = false) }}\n      {%- endif %}\n      {%- if og_t(og_eq(v_action, 'button')) %}\n        {%- set c_11 -%}\n          {{ og_text(og_get(v_labels, ['add'])) }}\n        {%- endset -%}\n        {{ include('compose/Button.html.twig', {'variant': 'default', 'size': 'sm', 'type': 'button', 'children': c_11}, with_context = false) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/Group.html.twig', {'gap': '4', 'justify': 'between', 'class': 'mt-auto pt-2', 'children': c_12}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/CardContent.html.twig', {'class': 'flex flex-1 flex-col gap-2', 'children': c_13}, with_context = false) }}\n{%- endset -%}\n{{ include('compose/Block.html.twig', {'tag': 'article', 'class': og_s(og_cnv(['flex flex-col gap-8 bg-card p-6 text-card-foreground inset-ring inset-ring-border rounded', 'h-full gap-4 overflow-hidden', (og_t(og_eq(v_layout, 'horizontal')) ? 'flex flex-col sm:flex-row' : 'flex flex-col')])), 'attrs': og_attrs(['data-slot', 'card', 'data-layout', v_layout]), 'children': c_14}, with_context = false) }}\n",
      "path": "blocks/dish-card.html.twig",
      "target": "blocks/dish-card.html.twig"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "restaurant",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "dish-card",
  "registryDependencies": [
    "badge",
    "block",
    "box",
    "button",
    "card-content",
    "group",
    "link",
    "media-frame",
    "text",
    "title",
    "utils"
  ],
  "runtime": "twig",
  "title": "Dish Card",
  "type": "registry:block"
}
