{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Cta Actions 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 actions of a call to action: one or two links (ActionGroup), or an email field with a button (actions\n  form).\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { ActionSet } from \"./cta-actions.types\";\n\n  export type CtaActionsProps = {\n    id: string;\n    actions: ActionSet;\n    center?: boolean;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Button from \"../compose/Button.svelte\";\n  import Form from \"../compose/Form.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import Input from \"../compose/Input.svelte\";\n  import Label from \"../compose/Label.svelte\";\n  import ActionGroup from \"../components/action-group.svelte\";\n  import { cn, tpl } from \"../utils\";\n\n  let { id, actions, center = false }: CtaActionsProps = $props();\n</script>\n\n{#if (actions.mode === \"form\")}\n  <Form method=\"dialog\" class={cn(\"w-full max-w-md\", (center ? \"mx-auto\" : \"\"))} data-slot=\"email-form\">\n    <Label for={tpl(\"{0}-email\", id)} class=\"sr-only\">\n      {actions.emailLabel}\n    </Label>\n    <Group gap=\"2\" align=\"start\" class=\"w-full flex-wrap\">\n      <Input type=\"email\" name=\"email\" class=\"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{:else}\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{/if}\n",
      "path": "components/cta-actions.svelte",
      "target": "components/cta-actions.svelte"
    },
    {
      "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": [
      "svelte",
      "component"
    ]
  },
  "name": "cta-actions",
  "registryDependencies": [
    "action-group",
    "button",
    "form",
    "group",
    "input",
    "label",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Cta Actions",
  "type": "registry:component"
}
