{
  "$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 */\nimport { type ReactNode } from \"react\";\nimport { Badge, Grid, Group } from \"../compose\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { PricingCard } from \"../blocks/pricing-card\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { Switcher } from \"../components/switcher\";\nimport { SwitcherItem } from \"../components/switcher-item\";\nimport { fitCols } from \"../utils\";\nimport type { BillingLabels } from \"./pricing-tiers.types\";\nimport type { Plan, PricingCardLabels } from \"./pricing-card.types\";\n\nexport 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\nexport function PricingTiers({\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) {\n  return (\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      {((billing as string) !== \"off\") ? (\n        <Group gap=\"4\" align=\"center\" justify=\"center\" className=\"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      ) : null}\n      {((plans?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"layers\" title={labels.empty} />\n      ) : (\n        <Grid\n          cols={(((layout as string) === \"stack\") ? \"1\" : fitCols(cols, (plans?.length ?? 0)))}\n          className=\"gap-4\"\n          data-slot=\"tiers\"\n        >\n          {(plans ?? []).map((plan) => (\n            <PricingCard key={plan.id}\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          ))}\n        </Grid>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/pricing-tiers.tsx",
      "target": "blocks/pricing-tiers.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 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": [
      "react",
      "block"
    ]
  },
  "name": "pricing-tiers",
  "registryDependencies": [
    "compose",
    "empty-state",
    "pricing-card",
    "section-frame",
    "switcher",
    "switcher-item",
    "utils"
  ],
  "runtime": "react",
  "title": "Pricing Tiers",
  "type": "registry:block"
}
