{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Plans as a grid or a stack of cards.",
  "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  A section with a heading and one PricingCard per plan; an empty state when there are none. Axes: layout (grid,\n  stack), columns, emphasis, billing (off: no toggle; monthly or annual: a toggle with that choice selected, and\n  the prices of that period), density, tone.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { BillingLabels } from \"./pricing-tiers.types\";\n  import type { Plan, PricingCardLabels } from \"./pricing-card.types\";\n\n  export type PricingTiersProps = {\n    id: string;\n    title: string;\n    plans: Plan[];\n    labels: PricingCardLabels;\n    billingLabels: BillingLabels;\n    layout?: \"grid\" | \"stack\";\n    cols?: \"1-2\" | \"1-3\" | \"1-4\";\n    emphasis?: \"auto\" | \"off\";\n    billing?: \"off\" | \"monthly\" | \"annual\";\n    tone?: \"default\" | \"muted\";\n    density?: \"roomy\" | \"default\" | \"compact\";\n    landmarkLabel?: string;\n    onselect?: (id: string) => void;\n    onbilling?: (period: string) => void;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Badge from \"../compose/Badge.svelte\";\n  import Grid from \"../compose/Grid.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import PricingCard from \"../blocks/pricing-card.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import Switcher from \"../components/switcher.svelte\";\n  import SwitcherItem from \"../components/switcher-item.svelte\";\n  import { fitCols } from \"../utils\";\n\n  let {\n    id,\n    title,\n    plans,\n    labels,\n    billingLabels,\n    layout = \"grid\",\n    cols = \"1-3\",\n    emphasis = \"auto\",\n    billing = \"off\",\n    tone = \"default\",\n    density = \"default\",\n    landmarkLabel,\n    onselect,\n    onbilling,\n  }: PricingTiersProps = $props();\n</script>\n\n<SectionFrame\n  id={id}\n  title={title}\n  tone={tone}\n  density={density}\n  measure={(((layout as string) === \"stack\") ? \"md\" : \"default\")}\n  landmarkLabel={landmarkLabel}\n>\n  {#if ((billing as string) !== \"off\")}\n    <Group gap=\"4\" align=\"center\" justify=\"center\" class=\"flex-wrap\" data-slot=\"billing\">\n      <Switcher label={billingLabels.label}>\n        <SwitcherItem active={((billing as string) === \"monthly\")} onclick={() => onbilling?.(\"monthly\")}>\n          {billingLabels.monthly}\n        </SwitcherItem>\n        <SwitcherItem active={((billing as string) === \"annual\")} onclick={() => onbilling?.(\"annual\")}>\n          {billingLabels.annual}\n        </SwitcherItem>\n      </Switcher>\n      <Badge variant=\"default\" size=\"default\">\n        {billingLabels.save}\n      </Badge>\n    </Group>\n  {/if}\n  {#if ((plans?.length ?? 0) === 0)}\n    <EmptyState icon=\"layers\" title={labels.empty} />\n  {:else}\n    <Grid\n      cols={(((layout as string) === \"stack\") ? \"1\" : fitCols(cols, (plans?.length ?? 0)))}\n      class=\"gap-4\"\n      data-slot=\"tiers\"\n    >\n      {#each plans as plan (plan.id)}\n        <PricingCard\n          plan={plan}\n          labels={labels}\n          emphasis={emphasis}\n          billing={(((billing as string) === \"annual\") ? \"annual\" : \"monthly\")}\n          density={(((density as string) === \"compact\") ? \"compact\" : \"default\")}\n          onselect={() => onselect?.(plan.id)}\n        />\n      {/each}\n    </Grid>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/pricing-tiers.svelte",
      "target": "blocks/pricing-tiers.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 BillingLabels = {\n  label: string;\n  monthly: string;\n  annual: string;\n  save: string;\n};\n",
      "path": "blocks/pricing-tiers.types.ts",
      "target": "blocks/pricing-tiers.types.ts"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "pricing",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "pricing-tiers",
  "registryDependencies": [
    "badge",
    "empty-state",
    "grid",
    "group",
    "pricing-card",
    "section-frame",
    "switcher",
    "switcher-item",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Pricing Tiers",
  "type": "registry:block"
}
