{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A slider for how much is used and the price it gives. The estimate follows the slider; the page keeps the value.",
  "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/usage-calculator.json\n    A price that follows a slider: the chosen amount of use, the price per unit and the estimate. The page keeps the amount and updates it on the `usage` event. Axes: layout (card, plain), ends (show: the smallest and the largest amount under the slider, hide), tone.\n    Props (p): id, title, text, usage, slider, price, cta, href, layout, ends, tone, landmarkLabel. -#}\n{%- set v_id = og_def(p['id'], none) -%}\n{%- set v_title = og_def(p['title'], none) -%}\n{%- set v_text = og_def(p['text'], none) -%}\n{%- set v_usage = og_def(p['usage'], none) -%}\n{%- set v_slider = og_def(p['slider'], none) -%}\n{%- set v_price = og_def(p['price'], none) -%}\n{%- set v_cta = og_def(p['cta'], none) -%}\n{%- set v_href = og_def(p['href'], none) -%}\n{%- set v_layout = og_def(p['layout'], 'card') -%}\n{%- set v_ends = og_def(p['ends'], 'show') -%}\n{%- set v_tone = og_def(p['tone'], 'default') -%}\n{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}\n{%- set c_13 -%}\n  {%- set c_12 -%}\n    {%- set c_3 -%}\n      {%- set c_1 -%}\n        {{ og_text(og_tpl(og_get(v_slider, ['unit']), [v_usage])) }}\n      {%- endset -%}\n      {{ og_include('compose/text.html.j2', {'p': {'Size': 'xl', 'Weight': 'bold'}, 'children': c_1}) }}\n      {%- set c_2 -%}\n        {{ og_text(og_get(v_slider, ['label'])) }}\n      {%- endset -%}\n      {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}\n    {%- endset -%}\n    {{ og_include('compose/group.html.j2', {'p': {'Justify': 'between', 'Align': 'baseline'}, 'children': c_3}) }}\n    {{ og_include('compose/range.html.j2', {'p': {'Min': og_i(og_get(v_slider, ['min'])), 'Max': og_i(og_get(v_slider, ['max'])), 'Value': og_s(v_usage), 'Attrs': og_attrs(['aria-label', og_get(v_slider, ['label']), 'data-slot', 'slider'])}}) }}\n    {%- if og_t(og_eq(v_ends, 'show')) %}\n      {%- set c_6 -%}\n        {%- set c_4 -%}\n          {{ og_text(og_tpl(og_get(v_slider, ['unit']), [og_get(v_slider, ['min'])])) }}\n        {%- endset -%}\n        {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_4}) }}\n        {%- set c_5 -%}\n          {{ og_text(og_tpl(og_get(v_slider, ['unit']), [og_get(v_slider, ['max'])])) }}\n        {%- endset -%}\n        {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_5}) }}\n      {%- endset -%}\n      {{ og_include('compose/group.html.j2', {'p': {'Justify': 'between', 'Attrs': og_attrs(['data-slot', 'ends'])}, 'children': c_6}) }}\n    {%- endif %}\n    {%- set c_11 -%}\n      {%- set c_9 -%}\n        {%- set c_7 -%}\n          {{ og_text(og_get(v_price, ['label'])) }}\n        {%- endset -%}\n        {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_7}) }}\n        {%- set c_8 -%}\n          {{ og_text(og_money(og_mul(v_usage, og_get(v_price, ['rate'])), og_get(v_price, ['currency']))) }}\n        {%- endset -%}\n        {{ og_include('compose/text.html.j2', {'p': {'Size': '4xl', 'Weight': 'bold', 'Attrs': og_attrs(['data-slot', 'estimate'])}, 'children': c_8}) }}\n      {%- endset -%}\n      {{ og_include('compose/stack.html.j2', {'p': {'Gap': '0'}, 'children': c_9}) }}\n      {%- set c_10 -%}\n        {{ og_text(v_cta) }}\n      {%- endset -%}\n      {{ og_include('compose/button.html.j2', {'p': {'Variant': 'default', 'Size': 'default', 'Href': og_url(og_s(v_href))}, 'children': c_10}) }}\n    {%- endset -%}\n    {{ og_include('compose/group.html.j2', {'p': {'Justify': 'between', 'Align': 'center', 'Class': 'flex-wrap'}, 'children': c_11}) }}\n  {%- endset -%}\n  {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Class': og_s(og_cnv(['mx-auto w-full max-w-xl', ('rounded bg-card p-6 inset-ring inset-ring-border' if og_t(og_eq(v_layout, 'card')) else '')])), 'Attrs': og_attrs(['data-slot', 'usage'])}, 'children': c_12}) }}\n{%- endset -%}\n{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_text, 'tone': v_tone, 'align': 'center', 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_13)}) }}\n",
      "path": "blocks/usage-calculator.html.j2",
      "target": "blocks/usage-calculator.html.j2"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "pricing",
    "kind": "block",
    "tags": [
      "jinja2",
      "block"
    ]
  },
  "name": "usage-calculator",
  "registryDependencies": [
    "button",
    "group",
    "range",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Usage Calculator",
  "type": "registry:block"
}
