{
  "$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 = (p.id ?? null) -%}\n{%- set v_title = (p.title ?? null) -%}\n{%- set v_text = (p.text ?? null) -%}\n{%- set v_usage = (p.usage ?? null) -%}\n{%- set v_slider = (p.slider ?? null) -%}\n{%- set v_price = (p.price ?? null) -%}\n{%- set v_cta = (p.cta ?? null) -%}\n{%- set v_href = (p.href ?? null) -%}\n{%- set v_layout = (p.layout ?? 'card') -%}\n{%- set v_ends = (p.ends ?? 'show') -%}\n{%- set v_tone = (p.tone ?? 'default') -%}\n{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}\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      {{ include('compose/Text.html.twig', {'size': 'xl', 'weight': 'bold', 'children': c_1}, with_context = false) }}\n      {%- set c_2 -%}\n        {{ og_text(og_get(v_slider, ['label'])) }}\n      {%- endset -%}\n      {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}\n    {%- endset -%}\n    {{ include('compose/Group.html.twig', {'justify': 'between', 'align': 'baseline', 'children': c_3}, with_context = false) }}\n    {{ include('compose/Range.html.twig', {'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'])}, with_context = false) }}\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        {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_4}, with_context = false) }}\n        {%- set c_5 -%}\n          {{ og_text(og_tpl(og_get(v_slider, ['unit']), [og_get(v_slider, ['max'])])) }}\n        {%- endset -%}\n        {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_5}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Group.html.twig', {'justify': 'between', 'attrs': og_attrs(['data-slot', 'ends']), 'children': c_6}, with_context = false) }}\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        {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_7}, with_context = false) }}\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        {{ include('compose/Text.html.twig', {'size': '4xl', 'weight': 'bold', 'attrs': og_attrs(['data-slot', 'estimate']), 'children': c_8}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Stack.html.twig', {'gap': '0', 'children': c_9}, with_context = false) }}\n      {%- set c_10 -%}\n        {{ og_text(v_cta) }}\n      {%- endset -%}\n      {{ include('compose/Button.html.twig', {'variant': 'default', 'size': 'default', 'href': og_url(og_s(v_href)), 'children': c_10}, with_context = false) }}\n    {%- endset -%}\n    {{ include('compose/Group.html.twig', {'justify': 'between', 'align': 'center', 'class': 'flex-wrap', 'children': c_11}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/Stack.html.twig', {'gap': '4', 'align': 'stretch', 'class': og_s(og_cnv(['mx-auto w-full max-w-xl', (og_t(og_eq(v_layout, 'card')) ? 'rounded bg-card p-6 inset-ring inset-ring-border' : '')])), 'attrs': og_attrs(['data-slot', 'usage']), 'children': c_12}, with_context = false) }}\n{%- endset -%}\n{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_text, 'tone': v_tone, 'align': 'center', 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_13)}, with_context = false) }}\n",
      "path": "blocks/usage-calculator.html.twig",
      "target": "blocks/usage-calculator.html.twig"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "pricing",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "usage-calculator",
  "registryDependencies": [
    "button",
    "group",
    "range",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "twig",
  "title": "Usage Calculator",
  "type": "registry:block"
}
