{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "One plan as a card.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/pricing-card.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// PricingCardProps are the props of PricingCard; the values are the JSON shapes of the TypeScript props.\ntype PricingCardProps struct {\n\tPlan any `json:\"plan\"`\n\tLabels any `json:\"labels\"`\n\tCurrent any `json:\"current\"`\n\tEmphasis any `json:\"emphasis\"`\n\tDensity any `json:\"density\"`\n\tBilling any `json:\"billing\"`\n\tFooter func(args ...any) templ.Component `json:\"-\"`\n}\n\n// A plan as a card: name, tagline, price per month, the features, a call to action and an optional slot for more actions. Text comes in through `labels`; the plan is data.\ntempl PricingCard(p PricingCardProps) {\n\t{{ vPlan := p.Plan }}\n\t{{ vLabels := p.Labels }}\n\t{{ vCurrent := p.Current }}\n\t{{ vEmphasis := uiutils.Def(p.Emphasis, \"auto\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vBilling := uiutils.Def(p.Billing, \"monthly\") }}\n\t{{ vStand := any(uiutils.And(uiutils.Get(vPlan, \"highlighted\"), uiutils.Eq(vEmphasis, \"auto\"))) }}\n\t{{ vYearlyOn := any(uiutils.And(uiutils.Eq(vBilling, \"annual\"), uiutils.Gt(uiutils.Get(vPlan, \"yearly\"), float64(0)))) }}\n\t{{ vAmount := any(uiutils.Cond(uiutils.T(vYearlyOn), uiutils.Get(vPlan, \"yearly\"), uiutils.Get(vPlan, \"price\"))) }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"article\", Class: uiutils.S(uiutils.Cnv(\"flex flex-col gap-8 bg-card p-6 text-card-foreground inset-ring inset-ring-border rounded\", \"flex h-full flex-col\")), Attrs: uiutils.Attrs(\"data-slot\", \"card\", \"data-highlighted\", uiutils.Cond(uiutils.T(vStand), \"true\", \"false\"), \"data-current\", uiutils.Cond(uiutils.T(vCurrent), \"true\", \"false\"))}}) {\n\t\t@compose.CardHeader(compose.CardHeaderProps{BoxProps: box.BoxProps{Class: \"flex flex-col gap-2\"}}) {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex min-h-6 items-center\", Attrs: uiutils.Attrs(\"data-slot\", \"badge-slot\")}}) {\n\t\t\t\tif uiutils.T(vStand) {\n\t\t\t\t\t@compose.Badge(compose.BadgeProps{Variant: \"default\", Size: \"default\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"popular\")) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t@compose.CardTitle(compose.CardTitleProps{As: \"3\", TextProps: text.TextProps{}}) {\n\t\t\t\t{ uiutils.Text(uiutils.Get(vPlan, \"name\")) }\n\t\t\t}\n\t\t\t@compose.CardDescription(compose.CardDescriptionProps{TextProps: text.TextProps{}}) {\n\t\t\t\t{ uiutils.Text(uiutils.Get(vPlan, \"tagline\")) }\n\t\t\t}\n\t\t}\n\t\t@compose.CardContent(compose.CardContentProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex flex-1 flex-col\", uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"gap-2\", \"gap-4\")))}}) {\n\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"baseline\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t@compose.Title(compose.TitleProps{As: \"2\", Size: \"4xl\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\tif uiutils.Eq(vAmount, float64(0)) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"free\")) }\n\t\t\t\t\t} else {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Money(vAmount, uiutils.Get(vPlan, \"currency\"))) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif uiutils.Gt(vAmount, float64(0)) {\n\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Cond(uiutils.T(vYearlyOn), uiutils.Get(vLabels, \"perYear\"), uiutils.Get(vLabels, \"perMonth\"))) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"medium\", TextProps: text.TextProps{}}) {\n\t\t\t\t{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, \"seats\"), uiutils.Get(vPlan, \"seats\"))) }\n\t\t\t}\n\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, \"storage\"), uiutils.Get(vPlan, \"storage\"))) }\n\t\t\t}\n\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ul\", Class: \"flex flex-col gap-2 text-sm\"}}) {\n\t\t\t\tfor _, vFeature := range uiutils.L(uiutils.Get(vPlan, \"features\")) {\n\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex gap-2\", Attrs: uiutils.Attrs(\"data-slot\", \"features-row\")}}) {\n\t\t\t\t\t\t{ uiutils.Text(vFeature) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@compose.CardFooter(compose.CardFooterProps{BoxProps: box.BoxProps{Class: \"flex flex-wrap items-center gap-2\"}}) {\n\t\t\t@compose.Button(compose.ButtonProps{Variant: uiutils.S(uiutils.Cond(uiutils.T(vStand), \"default\", \"outline\")), Size: \"default\", ButtonProps: button.ButtonProps{}}) {\n\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"cta\")) }\n\t\t\t}\n\t\t\tif p.Footer != nil {\n\t\t\t\t@p.Footer(vPlan)\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/pricing-card.templ",
      "target": "blocks/pricing-card.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "pricing",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "pricing-card",
  "registryDependencies": [
    "badge",
    "block",
    "box",
    "button",
    "card-content",
    "card-description",
    "card-footer",
    "card-header",
    "card-title",
    "group",
    "kit-box",
    "kit-button",
    "kit-text",
    "list",
    "list-item",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Pricing Card",
  "type": "registry:block"
}
