{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cta-section",
  "title": "CTA Section",
  "description": "One clear thing to do, in three decisions: a plate that ends the page, text beside a piece of the product, or a slim row inside a long page.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "utils",
    "https://miseui.junsu4621.workers.dev/r/badge.json",
    "https://miseui.junsu4621.workers.dev/r/button.json"
  ],
  "files": [
    {
      "path": "registry/miseui/blocks/cta-section.tsx",
      "content": "import { cn } from \"@/registry/miseui/lib/utils\"\nimport { CtaActions, CtaButton, CtaHeading, CtaNote, DEFAULT_COPY, ROOT_CLASS, type CtaAction, type CtaSectionCopyProps } from \"./cta-section-parts\"\nimport { CtaSectionSplit, type CtaSectionSplitProps } from \"./cta-section-split\"\n\ntype CtaSectionVariant = \"plate\" | \"split\" | \"banner\"\n\ninterface CtaSectionProps extends CtaSectionSplitProps {\n  /** `plate` the last thing on a page, `split` beside a piece of the product, `banner` a slim row inside a long page. Anything else is `plate`. */\n  variant?: CtaSectionVariant\n}\n\nfunction CtaSectionPlate({\n  headline = DEFAULT_COPY.headline,\n  headlineQuiet = DEFAULT_COPY.headlineQuiet,\n  description = DEFAULT_COPY.description,\n  primaryAction = DEFAULT_COPY.primaryAction,\n  secondaryAction = DEFAULT_COPY.secondaryAction,\n  note = DEFAULT_COPY.note,\n  className,\n  ...props\n}: CtaSectionCopyProps) {\n  return (\n    <section data-slot=\"cta-section\" data-variant=\"plate\" className={cn(ROOT_CLASS, className)} {...props}>\n      <div className=\"mx-auto w-full max-w-6xl px-4 py-12 @2xl:px-8 @2xl:py-16\">\n        <div data-slot=\"cta-section-plate\" className=\"flex flex-col items-start gap-6 rounded-3xl border bg-background px-6 py-12 dark:bg-card @2xl:items-center @2xl:px-12 @2xl:py-20 @2xl:text-center\">\n          <CtaHeading headline={headline} quiet={headlineQuiet} className=\"max-w-2xl @2xl:text-4xl\" />\n          <p className=\"max-w-md text-[15px] leading-relaxed text-pretty text-muted-foreground\">{description}</p>\n          <CtaActions primary={primaryAction} secondary={secondaryAction} className=\"@2xl:justify-center\" />\n          <CtaNote note={note} />\n        </div>\n      </div>\n    </section>\n  )\n}\n\n/** One thing to do and no description: a soft row people can pass, unlike the plate, which asks them to stop. */\nfunction CtaSectionBanner({\n  headline = DEFAULT_COPY.headline,\n  headlineQuiet = DEFAULT_COPY.headlineQuiet,\n  primaryAction = DEFAULT_COPY.primaryAction,\n  className,\n  ...props\n}: Omit<CtaSectionCopyProps, \"description\" | \"secondaryAction\" | \"note\">) {\n  return (\n    <section data-slot=\"cta-section\" data-variant=\"banner\" className={cn(ROOT_CLASS, className)} {...props}>\n      <div className=\"mx-auto w-full max-w-6xl px-4 py-6 @2xl:px-8\">\n        {/* Stacks instead of truncating: a clipped sentence beside a button says nothing. */}\n        <div data-slot=\"cta-section-banner\" className=\"flex flex-col items-start gap-3 rounded-2xl bg-mise-soft p-4 dark:border dark:bg-card @2xl:flex-row @2xl:items-center @2xl:justify-between @2xl:gap-6 @2xl:py-3 @2xl:pr-3 @2xl:pl-6\">\n          <h2 className=\"min-w-0 text-[15px] leading-snug font-medium text-pretty\">\n            {headline} <span className=\"font-normal text-foreground/70\">{headlineQuiet}</span>\n          </h2>\n          <CtaButton action={primaryAction} variant=\"default\" className=\"h-10 px-4 text-sm\" />\n        </div>\n      </div>\n    </section>\n  )\n}\n\nfunction CtaSection({ variant, fragment, description, secondaryAction, note, ...props }: CtaSectionProps) {\n  switch (variant) {\n    case \"split\":\n      return <CtaSectionSplit fragment={fragment} description={description} secondaryAction={secondaryAction} note={note} {...props} />\n    case \"banner\":\n      return <CtaSectionBanner {...props} />\n    default:\n      return <CtaSectionPlate description={description} secondaryAction={secondaryAction} note={note} {...props} />\n  }\n}\n\nexport { CtaSection, type CtaAction, type CtaSectionProps, type CtaSectionVariant }\n",
      "type": "registry:component"
    },
    {
      "path": "registry/miseui/blocks/cta-section-parts.tsx",
      "content": "import type * as React from \"react\"\nimport { ArrowRight } from \"lucide-react\"\nimport { cn } from \"@/registry/miseui/lib/utils\"\nimport { Button, type ButtonProps } from \"@/registry/miseui/ui/button\"\n\ninterface CtaAction {\n  label: string\n  /** Renders a real link, so it can be opened in a new tab and read by crawlers. */\n  href?: string\n  onClick?: () => void\n}\n\ninterface CtaSectionCopyProps extends React.ComponentProps<\"section\"> {\n  /** With headlineQuiet, two lines at most. This is a last nudge and not a second hero. */\n  headline?: string\n  /** Continues the headline in the same size, one tone quieter. */\n  headlineQuiet?: string\n  /** One sentence. Not shown on `banner`, which has room for the headline alone. */\n  description?: string\n  primaryAction?: CtaAction\n  /** Null leaves one button. Not shown on `banner`. */\n  secondaryAction?: CtaAction | null\n  /** What it does not cost, right under the buttons. Say only what is true of your product. Null removes it. */\n  note?: string | null\n}\n\nconst DEFAULT_COPY = {\n  headline: \"Your next call can end in a plan.\",\n  headlineQuiet: \"Invite it once and see.\",\n  description: \"It listens, writes down who owns what, and sends it to everyone who was there.\",\n  primaryAction: { label: \"Try it on your next call\" },\n  secondaryAction: { label: \"See a sample summary\" },\n  note: \"No card needed. Cancel from settings.\",\n} as const\n\nconst ROOT_CLASS = \"@container flex w-full flex-col justify-center bg-muted dark:bg-background\"\n\nfunction CtaButton({ action, variant, className, children }: { action: CtaAction; variant: ButtonProps[\"variant\"]; className?: string; children?: React.ReactNode }) {\n  if (action.href) {\n    return (\n      <Button asChild size=\"lg\" variant={variant} className={className}>\n        <a href={action.href} onClick={action.onClick}>\n          {action.label}\n          {children}\n        </a>\n      </Button>\n    )\n  }\n  return (\n    <Button size=\"lg\" variant={variant} onClick={action.onClick} className={className}>\n      {action.label}\n      {children}\n    </Button>\n  )\n}\n\nfunction CtaActions({ primary, secondary, className }: { primary: CtaAction; secondary: CtaAction | null; className?: string }) {\n  return (\n    <div className={cn(\"flex flex-wrap gap-3\", className)}>\n      <CtaButton action={primary} variant=\"mise\">\n        <ArrowRight />\n      </CtaButton>\n      {secondary ? <CtaButton action={secondary} variant=\"ghost\" /> : null}\n    </div>\n  )\n}\n\nfunction CtaHeading({ headline, quiet, className }: { headline: string; quiet: string; className?: string }) {\n  return (\n    <h2 className={cn(\"text-title text-3xl text-balance\", className)}>\n      {headline} <span className=\"text-muted-foreground\">{quiet}</span>\n    </h2>\n  )\n}\n\nfunction CtaNote({ note, className }: { note: string | null; className?: string }) {\n  if (!note) return null\n  return <p className={cn(\"text-[13px] leading-5 text-pretty text-muted-foreground\", className)}>{note}</p>\n}\n\nexport { CtaActions, CtaButton, CtaHeading, CtaNote, DEFAULT_COPY, ROOT_CLASS, type CtaAction, type CtaSectionCopyProps }\n",
      "type": "registry:component"
    },
    {
      "path": "registry/miseui/blocks/cta-section-split.tsx",
      "content": "import type * as React from \"react\"\nimport { cn } from \"@/registry/miseui/lib/utils\"\nimport { Badge } from \"@/registry/miseui/ui/badge\"\nimport { CtaActions, CtaHeading, CtaNote, DEFAULT_COPY, ROOT_CLASS, type CtaSectionCopyProps } from \"./cta-section-parts\"\n\nconst SAMPLE_ROWS = [\n  { owner: \"Priya\", task: \"Send the revised tiers to sales\", due: \"Thursday\" },\n  { owner: \"Tomas\", task: \"Draft the customer email\", due: \"Monday\" },\n  { owner: \"Wen\", task: \"Brief support on the change\", due: \"Friday\" },\n] as const\n\n/** Sits on the bottom edge of the plate, so it reads as something coming out of the product and not a card floating beside the words. */\nfunction CtaSampleFragment() {\n  return (\n    <figure data-slot=\"cta-section-fragment\" className=\"m-0 rounded-t-2xl border border-b-0 bg-card dark:bg-muted\">\n      <figcaption className=\"flex flex-wrap items-center justify-between gap-2 border-b px-4 py-3\">\n        <span className=\"text-[15px] leading-snug\">Weekly pricing review</span>\n        <Badge variant=\"secondary\" className=\"font-normal\">\n          Sample\n        </Badge>\n      </figcaption>\n      <ul className=\"flex flex-col divide-y\">\n        {SAMPLE_ROWS.map((row) => (\n          <li key={row.owner} className=\"grid grid-cols-[minmax(0,1fr)_auto] items-baseline gap-x-4 px-4 py-3 text-[13px] leading-5\">\n            <span className=\"min-w-0 text-pretty\">\n              <span className=\"font-medium\">{row.owner}</span> <span className=\"text-muted-foreground\">{row.task}</span>\n            </span>\n            <span className=\"whitespace-nowrap text-muted-foreground\">{row.due}</span>\n          </li>\n        ))}\n      </ul>\n    </figure>\n  )\n}\n\ninterface CtaSectionSplitProps extends CtaSectionCopyProps {\n  /** A piece of your real product. Null leaves the text alone on the plate. */\n  fragment?: React.ReactNode\n}\n\nfunction CtaSectionSplit({\n  headline = DEFAULT_COPY.headline,\n  headlineQuiet = DEFAULT_COPY.headlineQuiet,\n  description = DEFAULT_COPY.description,\n  primaryAction = DEFAULT_COPY.primaryAction,\n  secondaryAction = DEFAULT_COPY.secondaryAction,\n  note = DEFAULT_COPY.note,\n  fragment = <CtaSampleFragment />,\n  className,\n  ...props\n}: CtaSectionSplitProps) {\n  const hasFragment = fragment !== null\n  return (\n    <section data-slot=\"cta-section\" data-variant=\"split\" className={cn(ROOT_CLASS, className)} {...props}>\n      <div className=\"mx-auto w-full max-w-6xl px-4 py-12 @2xl:px-8 @2xl:py-16\">\n        <div className={cn(\"grid grid-cols-[minmax(0,1fr)] rounded-3xl border bg-background dark:bg-card\", hasFragment && \"@4xl:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]\")}>\n          <div className=\"flex min-w-0 flex-col items-start gap-6 p-6 @2xl:p-12\">\n            <CtaHeading headline={headline} quiet={headlineQuiet} className=\"@2xl:text-4xl\" />\n            <p className=\"max-w-md text-[15px] leading-relaxed text-pretty text-muted-foreground\">{description}</p>\n            <CtaActions primary={primaryAction} secondary={secondaryAction} />\n            <CtaNote note={note} />\n          </div>\n          {hasFragment ? <div className=\"flex min-w-0 flex-col justify-end px-6 @2xl:px-12 @4xl:pt-12 @4xl:pr-12 @4xl:pl-0\">{fragment}</div> : null}\n        </div>\n      </div>\n    </section>\n  )\n}\n\nexport { CtaSectionSplit, type CtaSectionSplitProps }\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "blocks"
  ],
  "type": "registry:block"
}