{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The head of a section: an optional badge, the heading (h1 or h2) with an optional link opposite it, and an optional lead. No wrapper: its parts are children of the section stack.",
  "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/patterns/section-header.json\n    The head of a section: an optional badge, the heading (h1 or h2) with an optional link opposite it, and an optional lead. No wrapper: its parts are children of the section stack.\n    Props (p): titleId, title, heading, action, lead, center. -#}\n{%- set v_titleId = og_def(p['titleId'], none) -%}\n{%- set v_title = og_def(p['title'], '') -%}\n{%- set v_heading = og_def(p['heading'], none) -%}\n{%- set v_action = og_def(p['action'], none) -%}\n{%- set v_lead = og_def(p['lead'], none) -%}\n{%- set v_center = og_def(p['center'], false) -%}\n{%- set v_level = og_coalesce([og_get(v_heading, ['level']), 2]) -%}\n{%- set v_scale = og_coalesce([og_get(v_heading, ['scale']), 'default']) -%}\n{%- set v_hasAction = og_and([og_get(v_action, ['label']), og_get(v_action, ['href'])]) -%}\n{%- if og_t(og_get(v_heading, ['badge'])) %}\n  {%- set c_1 -%}\n    {{ og_text(og_get(v_heading, ['badge'])) }}\n  {%- endset -%}\n  {{ og_include('compose/badge.html.j2', {'p': {'Variant': 'outline', 'Size': 'lg', 'Class': og_s(('mx-auto w-fit' if og_t(v_center) else 'w-fit'))}, 'children': c_1}) }}\n{%- endif %}\n{%- if og_t(og_and([not (og_eq(v_title, '')), v_hasAction])) %}\n  {%- set c_4 -%}\n    {%- set c_2 -%}\n      {{ og_text(v_title) }}\n    {%- endset -%}\n    {{ og_include('compose/title.html.j2', {'p': {'As': og_i(v_level), 'Size': og_s(('5xl' if og_t(og_eq(v_level, 1)) else 'xl')), 'Weight': 'semibold', 'Class': og_s(('text-6xl tracking-tight md:text-8xl' if og_t(og_eq(v_scale, 'display')) else ('leading-tight' if og_t(og_eq(v_level, 1)) else 'leading-7'))), 'Attrs': og_attrs(['id', v_titleId])}, 'children': c_2}) }}\n    {%- set c_3 -%}\n      {{ og_text(og_get(v_action, ['label'])) }}\n    {%- endset -%}\n    {{ og_include('compose/link.html.j2', {'p': {'Href': og_url(og_s(og_get(v_action, ['href']))), 'Variant': 'default', 'Class': og_s(og_cnv([og_preset('blocks/presets/defaults.json', ['text', 'tiny']), 'shrink-0 font-medium leading-5'])), 'Attrs': og_attrs(['data-slot', 'section-action'])}, 'children': c_3}) }}\n  {%- endset -%}\n  {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between', 'Class': 'w-full flex-wrap', 'Attrs': og_attrs(['data-slot', 'section-header'])}, 'children': c_4}) }}\n{%- endif %}\n{%- if og_t(og_and([not (og_eq(v_title, '')), not (og_t(v_hasAction))])) %}\n  {%- set c_5 -%}\n    {{ og_text(v_title) }}\n  {%- endset -%}\n  {{ og_include('compose/title.html.j2', {'p': {'As': og_i(v_level), 'Size': og_s(('5xl' if og_t(og_eq(v_level, 1)) else 'xl')), 'Weight': 'semibold', 'Class': og_s(('text-6xl tracking-tight md:text-8xl' if og_t(og_eq(v_scale, 'display')) else ('leading-tight' if og_t(og_eq(v_level, 1)) else 'leading-7'))), 'Attrs': og_attrs(['id', v_titleId, 'data-slot', 'section-header'])}, 'children': c_5}) }}\n{%- endif %}\n{%- if og_t(og_and([og_eq(v_title, ''), v_hasAction])) %}\n  {%- set c_7 -%}\n    {%- set c_6 -%}\n      {{ og_text(og_get(v_action, ['label'])) }}\n    {%- endset -%}\n    {{ og_include('compose/link.html.j2', {'p': {'Href': og_url(og_s(og_get(v_action, ['href']))), 'Variant': 'default', 'Class': og_s(og_cnv([og_preset('blocks/presets/defaults.json', ['text', 'tiny']), 'shrink-0 font-medium leading-5'])), 'Attrs': og_attrs(['data-slot', 'section-action'])}, 'children': c_6}) }}\n  {%- endset -%}\n  {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'end', 'Class': 'w-full', 'Attrs': og_attrs(['data-slot', 'section-header'])}, 'children': c_7}) }}\n{%- endif %}\n{%- if og_t(v_lead) %}\n  {%- set c_8 -%}\n    {{ og_text(v_lead) }}\n  {%- endset -%}\n  {{ og_include('compose/text.html.j2', {'p': {'Size': 'base', 'Class': og_s(og_cnv(['max-w-2xl text-muted-foreground', ('mx-auto' if og_t(v_center) else '')])), 'Attrs': og_attrs(['data-slot', 'section-header'])}, 'children': c_8}) }}\n{%- endif %}\n",
      "path": "blocks/section-header.html.j2",
      "target": "blocks/section-header.html.j2"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "jinja2",
      "component"
    ]
  },
  "name": "section-header",
  "registryDependencies": [
    "badge",
    "group",
    "link",
    "presets",
    "text",
    "title",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Section Header",
  "type": "registry:component"
}
