{
  "$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/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * The head of a section: an optional badge, the heading (h1 or h2) with an optional link opposite it, and an\n * optional lead. No wrapper: its parts are children of the section stack.\n */\nimport { type JSX } from \"solid-js\";\nimport { Badge, Group, Link, Text, Title } from \"../compose\";\nimport { defaults } from \"../presets/defaults\";\nimport { cn, urlOf } from \"../utils\";\nimport type { SectionHeading, HeadLink } from \"./section-frame.types\";\n\nexport type SectionHeaderProps = {\n  titleId: string;\n  title?: string;\n  heading?: SectionHeading;\n  action?: HeadLink;\n  lead?: string;\n  center?: boolean;\n};\n\nexport function SectionHeader({\n  titleId,\n  title = \"\",\n  heading,\n  action,\n  lead,\n  center = false,\n}: SectionHeaderProps) {\n  const level = heading?.level ?? 2;\n  const scale = heading?.scale ?? \"default\";\n  const hasAction = action?.label && action?.href;\n  return (\n    <>\n      {heading?.badge ? (\n        <Badge variant=\"outline\" size=\"lg\" class={(center ? \"mx-auto w-fit\" : \"w-fit\")}>\n          {heading?.badge}\n        </Badge>\n      ) : null}\n      {(((title as string) !== \"\") && hasAction) ? (\n        <Group gap=\"4\" align=\"center\" justify=\"between\" class=\"w-full flex-wrap\" data-slot=\"section-header\">\n          <Title\n            as={level}\n            size={((level === 1) ? \"5xl\" : \"xl\")}\n            weight=\"semibold\"\n            class={\n              (scale as string) === \"display\" ? \"text-6xl tracking-tight md:text-8xl\"\n              : level === 1 ? \"leading-tight\"\n              : \"leading-7\"\n            }\n            id={titleId}\n          >\n            {title}\n          </Title>\n          <Link\n            href={urlOf(action?.href)}\n            variant=\"default\"\n            class={cn(defaults.text.tiny, \"shrink-0 font-medium leading-5\")}\n            data-slot=\"section-action\"\n          >\n            {action?.label}\n          </Link>\n        </Group>\n      ) : null}\n      {(((title as string) !== \"\") && !hasAction) ? (\n        <Title\n          as={level}\n          size={((level === 1) ? \"5xl\" : \"xl\")}\n          weight=\"semibold\"\n          class={\n            (scale as string) === \"display\" ? \"text-6xl tracking-tight md:text-8xl\"\n            : level === 1 ? \"leading-tight\"\n            : \"leading-7\"\n          }\n          id={titleId}\n          data-slot=\"section-header\"\n        >\n          {title}\n        </Title>\n      ) : null}\n      {(((title as string) === \"\") && hasAction) ? (\n        <Group gap=\"4\" align=\"center\" justify=\"end\" class=\"w-full\" data-slot=\"section-header\">\n          <Link\n            href={urlOf(action?.href)}\n            variant=\"default\"\n            class={cn(defaults.text.tiny, \"shrink-0 font-medium leading-5\")}\n            data-slot=\"section-action\"\n          >\n            {action?.label}\n          </Link>\n        </Group>\n      ) : null}\n      {lead ? (\n        <Text\n          size=\"base\"\n          class={cn(\"max-w-2xl text-muted-foreground\", (center ? \"mx-auto\" : \"\"))}\n          data-slot=\"section-header\"\n        >\n          {lead}\n        </Text>\n      ) : null}\n    </>\n  );\n}\n",
      "path": "components/section-header.tsx",
      "target": "components/section-header.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "solid",
      "component"
    ]
  },
  "name": "section-header",
  "registryDependencies": [
    "compose",
    "presets",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Section Header",
  "type": "registry:component"
}
