{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Fill a box by weight: produce tiles beside the box with a meter.",
  "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/veggie-box.json\n    A vegetable box by weight: produce tiles (picture, name, price per kg, a weight field in kg named after the item) beside the box card with a meter of how full the box is, the total and the order button. Axes: layout (split, stacked), tone.\n    Props (p): id, title, lead, dishes, empty, labels, fill, total, currency, layout, tone, landmarkLabel. -#}\n{%- set v_id = (p.id ?? null) -%}\n{%- set v_title = (p.title ?? null) -%}\n{%- set v_lead = (p.lead ?? '') -%}\n{%- set v_dishes = (p.dishes ?? null) -%}\n{%- set v_empty = (p.empty ?? '') -%}\n{%- set v_labels = (p.labels ?? null) -%}\n{%- set v_fill = (p.fill ?? 60) -%}\n{%- set v_total = (p.total ?? null) -%}\n{%- set v_currency = (p.currency ?? null) -%}\n{%- set v_layout = (p.layout ?? 'split') -%}\n{%- set v_tone = (p.tone ?? 'default') -%}\n{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}\n{%- set c_13 -%}\n  {%- if og_t(og_eq(og_len(v_dishes), 0)) %}\n    {{ include('blocks/empty-state.html.twig', {'p': {'icon': 'package', 'title': v_empty}}, with_context = false) }}\n  {%- else %}\n    {%- set c_12 -%}\n      {%- set c_4 -%}\n        {%- for v_d in og_l(v_dishes) %}\n          {%- set c_3 -%}\n            {{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_d, ['name']), 'src': og_get(v_d, ['image']), 'ratio': '1/1'}}, with_context = false) }}\n            {%- set c_1 -%}\n              {{ og_text(og_get(v_d, ['name'])) }}\n            {%- endset -%}\n            {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_1}, with_context = false) }}\n            {%- set c_2 -%}\n              {{ og_text(og_tpl(og_get(v_labels, ['perKg']), [og_money(og_get(v_d, ['price']), og_get(v_d, ['currency']))])) }}\n            {%- endset -%}\n            {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}\n            {{ include('blocks/number-field.html.twig', {'p': {'value': '1', 'name': og_tpl('{0}-kg-{1}', [v_id, og_get(v_d, ['id'])]), 'min': '0', 'label': og_tpl(og_get(v_labels, ['weightOf']), [og_get(v_d, ['name'])]), 'decrease': og_tpl(og_get(v_labels, ['decreaseOf']), [og_get(v_d, ['name'])]), 'increase': og_tpl(og_get(v_labels, ['increaseOf']), [og_get(v_d, ['name'])])}}, with_context = false) }}\n          {%- endset -%}\n          {{ include('compose/Stack.html.twig', {'gap': '2', 'class': 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs': og_attrs(['data-slot', 'item']), 'children': c_3}, with_context = false) }}\n        {%- endfor %}\n      {%- endset -%}\n      {{ include('compose/Box.html.twig', {'class': og_s((og_t(og_eq(v_layout, 'split')) ? 'grid grid-cols-2 gap-4 md:grid-cols-3 lg:col-span-2' : 'grid grid-cols-2 gap-4 md:grid-cols-3 lg:col-span-3 lg:grid-cols-6')), 'attrs': og_attrs(['data-slot', 'items']), 'children': c_4}, with_context = false) }}\n      {%- set c_11 -%}\n        {%- set c_5 -%}\n          {{ og_text(og_get(v_labels, ['summary'])) }}\n        {%- endset -%}\n        {{ include('compose/Text.html.twig', {'size': 'lg', 'weight': 'semibold', 'children': c_5}, with_context = false) }}\n        {%- set c_6 -%}\n          {{ og_text(og_get(v_labels, ['boxFill'])) }}\n        {%- endset -%}\n        {{ include('compose/Label.html.twig', {'htmlFor': og_s(og_tpl('{0}-fill', [v_id])), 'class': 'text-sm text-muted-foreground', 'children': c_6}, with_context = false) }}\n        {{ include('compose/Meter.html.twig', {'value': og_s(v_fill), 'min': og_s(0), 'max': og_s(100), 'attrs': og_attrs(['id', og_tpl('{0}-fill', [v_id])])}, with_context = false) }}\n        {%- set c_9 -%}\n          {%- set c_7 -%}\n            {{ og_text(og_get(v_labels, ['total'])) }}\n          {%- endset -%}\n          {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_7}, with_context = false) }}\n          {%- set c_8 -%}\n            {{ og_text(og_money(v_total, v_currency)) }}\n          {%- endset -%}\n          {{ include('compose/Inline.html.twig', {'class': 'text-2xl font-bold', 'attrs': og_attrs(['role', 'status', 'aria-live', 'polite', 'data-slot', 'total']), 'children': c_8}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/Group.html.twig', {'gap': '2', 'align': 'baseline', 'justify': 'between', 'children': c_9}, with_context = false) }}\n        {%- set c_10 -%}\n          {{ include('icons/LucideIcon.html.twig', {'name': 'shopping-bag', 'size': 16}, with_context = false) }}\n          {{ og_text(og_get(v_labels, ['order'])) }}\n        {%- endset -%}\n        {{ include('compose/Button.html.twig', {'variant': 'default', 'size': 'lg', 'type': 'button', 'class': 'w-full', 'children': c_10}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Stack.html.twig', {'gap': '4', 'class': og_s((og_t(og_eq(v_layout, 'split')) ? 'rounded bg-card inset-ring inset-ring-border p-6 lg:sticky lg:top-8' : 'rounded bg-card inset-ring inset-ring-border p-6 lg:col-span-3')), 'attrs': og_attrs(['data-slot', 'summary']), 'children': c_11}, with_context = false) }}\n    {%- endset -%}\n    {{ include('compose/Box.html.twig', {'class': 'grid grid-cols-1 items-start gap-8 lg:grid-cols-3', 'children': c_12}, with_context = false) }}\n  {%- endif %}\n{%- endset -%}\n{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_13)}, with_context = false) }}\n",
      "path": "blocks/veggie-box.html.twig",
      "target": "blocks/veggie-box.html.twig"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "veggie-box",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "group",
    "inline",
    "label",
    "lucide-icon",
    "media-frame",
    "meter",
    "number-field",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "twig",
  "title": "Veggie Box",
  "type": "registry:block"
}
