{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The actions of a call to action: one or two links (ActionGroup), or an email field with a button (actions form).",
  "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 actions of a call to action: one or two links (ActionGroup), or an email field with a button (actions\n * form).\n */\nimport { type ReactNode } from \"react\";\nimport { Button, Form, Group, Input, Label } from \"../compose\";\nimport { ActionGroup } from \"../components/action-group\";\nimport { cn, tpl } from \"../utils\";\nimport type { ActionSet } from \"./cta-actions.types\";\n\nexport type CtaActionsProps = {\n  id: string;\n  actions: ActionSet;\n  center?: boolean;\n};\n\nexport function CtaActions({ id, actions, center = false }: CtaActionsProps) {\n  return (\n    <>\n      {(actions.mode === \"form\") ? (\n        <Form method=\"dialog\" className={cn(\"w-full max-w-md\", (center ? \"mx-auto\" : \"\"))} data-slot=\"email-form\">\n          <Label htmlFor={tpl(\"{0}-email\", id)} className=\"sr-only\">\n            {actions.emailLabel}\n          </Label>\n          <Group gap=\"2\" align=\"start\" className=\"w-full flex-wrap\">\n            <Input type=\"email\" name=\"email\" className=\"min-w-0 flex-1\" id={tpl(\"{0}-email\", id)} data-slot=\"field\" />\n            <Button variant=\"default\" size=\"default\" type=\"submit\">\n              {actions.cta}\n            </Button>\n          </Group>\n        </Form>\n      ) : (\n        <ActionGroup\n          primary={actions.cta}\n          primaryHref={actions.href}\n          secondary={((actions.mode === \"two\") ? actions.secondary : undefined)}\n          secondaryHref={actions.secondaryHref}\n          align={(center ? \"center\" : \"start\")}\n        />\n      )}\n    </>\n  );\n}\n",
      "path": "components/cta-actions.tsx",
      "target": "components/cta-actions.tsx"
    },
    {
      "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\nexport type ActionSet = {\n  /** one or two links, or a form */\n  mode?: \"one\" | \"two\" | \"form\";\n  /** primary action label */\n  cta: string;\n  /** the address of the primary action; none: a button, not a link */\n  href?: string;\n  secondary?: string;\n  secondaryHref?: string;\n  /** label of the form field (the email field, or the prompt line of HeroPrompt) */\n  emailLabel?: string;\n};\n",
      "path": "components/cta-actions.types.ts",
      "target": "components/cta-actions.types.ts"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "cta-actions",
  "registryDependencies": [
    "action-group",
    "compose",
    "utils"
  ],
  "runtime": "react",
  "title": "Cta Actions",
  "type": "registry:component"
}
