{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Section Header component",
  "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-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { SectionHeading, HeadLink } from \"./section-frame.types\";\n\n  export type SectionHeaderProps = {\n    titleId: string;\n    title?: string;\n    heading?: SectionHeading;\n    action?: HeadLink;\n    lead?: string;\n    center?: boolean;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Badge from \"../compose/Badge.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import Link from \"../compose/Link.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import Title from \"../compose/Title.svelte\";\n  import { defaults } from \"../presets/defaults\";\n  import { cn, urlOf } from \"../utils\";\n\n  let { titleId, title = \"\", heading, action, lead, center = false }: SectionHeaderProps = $props();\n  const level = $derived(heading?.level ?? 2);\n  const scale = $derived(heading?.scale ?? \"default\");\n  const hasAction = $derived(action?.label && action?.href);\n</script>\n\n{#if heading?.badge}\n  <Badge variant=\"outline\" size=\"lg\" class={(center ? \"mx-auto w-fit\" : \"w-fit\")}>\n    {heading?.badge}\n  </Badge>\n{/if}\n{#if (((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{/if}\n{#if (((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{/if}\n{#if (((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{/if}\n{#if 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{/if}\n",
      "path": "components/section-header.svelte",
      "target": "components/section-header.svelte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "section-header",
  "registryDependencies": [
    "badge",
    "group",
    "link",
    "presets",
    "section-frame",
    "text",
    "title",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Section Header",
  "type": "registry:component"
}
