{
  "$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 = og_def(p['id'], none) -%}\n{%- set v_title = og_def(p['title'], none) -%}\n{%- set v_lead = og_def(p['lead'], '') -%}\n{%- set v_dishes = og_def(p['dishes'], none) -%}\n{%- set v_empty = og_def(p['empty'], '') -%}\n{%- set v_labels = og_def(p['labels'], none) -%}\n{%- set v_fill = og_def(p['fill'], 60) -%}\n{%- set v_total = og_def(p['total'], none) -%}\n{%- set v_currency = og_def(p['currency'], none) -%}\n{%- set v_layout = og_def(p['layout'], 'split') -%}\n{%- set v_tone = og_def(p['tone'], 'default') -%}\n{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}\n{%- set c_13 -%}\n  {%- if og_t(og_eq(og_len(v_dishes), 0)) %}\n    {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'package', 'title': v_empty}}) }}\n  {%- else %}\n    {%- set c_12 -%}\n      {%- set c_4 -%}\n        {%- for v_d in og_l(v_dishes) %}\n          {%- set c_3 -%}\n            {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': og_get(v_d, ['name']), 'src': og_get(v_d, ['image']), 'ratio': '1/1'}}) }}\n            {%- set c_1 -%}\n              {{ og_text(og_get(v_d, ['name'])) }}\n            {%- endset -%}\n            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_1}) }}\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            {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}\n            {{ og_include('blocks/number-field.html.j2', {'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'])])}}) }}\n          {%- endset -%}\n          {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Class': 'rounded bg-card inset-ring inset-ring-border p-4', 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_3}) }}\n        {%- endfor %}\n      {%- endset -%}\n      {{ og_include('compose/box.html.j2', {'p': {'Class': og_s(('grid grid-cols-2 gap-4 md:grid-cols-3 lg:col-span-2' if og_t(og_eq(v_layout, 'split')) else '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}) }}\n      {%- set c_11 -%}\n        {%- set c_5 -%}\n          {{ og_text(og_get(v_labels, ['summary'])) }}\n        {%- endset -%}\n        {{ og_include('compose/text.html.j2', {'p': {'Size': 'lg', 'Weight': 'semibold'}, 'children': c_5}) }}\n        {%- set c_6 -%}\n          {{ og_text(og_get(v_labels, ['boxFill'])) }}\n        {%- endset -%}\n        {{ og_include('compose/label.html.j2', {'p': {'For': og_s(og_tpl('{0}-fill', [v_id])), 'Class': 'text-sm text-muted-foreground'}, 'children': c_6}) }}\n        {{ og_include('compose/meter.html.j2', {'p': {'Value': og_s(v_fill), 'Min': og_s(0), 'Max': og_s(100), 'Attrs': og_attrs(['id', og_tpl('{0}-fill', [v_id])])}}) }}\n        {%- set c_9 -%}\n          {%- set c_7 -%}\n            {{ og_text(og_get(v_labels, ['total'])) }}\n          {%- endset -%}\n          {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_7}) }}\n          {%- set c_8 -%}\n            {{ og_text(og_money(v_total, v_currency)) }}\n          {%- endset -%}\n          {{ og_include('compose/inline.html.j2', {'p': {'Class': 'text-2xl font-bold', 'Attrs': og_attrs(['role', 'status', 'aria-live', 'polite', 'data-slot', 'total'])}, 'children': c_8}) }}\n        {%- endset -%}\n        {{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Align': 'baseline', 'Justify': 'between'}, 'children': c_9}) }}\n        {%- set c_10 -%}\n          {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'shopping-bag', 'Size': 16}}) }}\n          {{ og_text(og_get(v_labels, ['order'])) }}\n        {%- endset -%}\n        {{ og_include('compose/button.html.j2', {'p': {'Variant': 'default', 'Size': 'lg', 'Type': 'button', 'Class': 'w-full'}, 'children': c_10}) }}\n      {%- endset -%}\n      {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Class': og_s(('rounded bg-card inset-ring inset-ring-border p-6 lg:sticky lg:top-8' if og_t(og_eq(v_layout, 'split')) else 'rounded bg-card inset-ring inset-ring-border p-6 lg:col-span-3')), 'Attrs': og_attrs(['data-slot', 'summary'])}, 'children': c_11}) }}\n    {%- endset -%}\n    {{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-1 items-start gap-8 lg:grid-cols-3'}, 'children': c_12}) }}\n  {%- endif %}\n{%- endset -%}\n{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_13)}) }}\n",
      "path": "blocks/veggie-box.html.j2",
      "target": "blocks/veggie-box.html.j2"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "jinja2",
      "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": "jinja2",
  "title": "Veggie Box",
  "type": "registry:block"
}
