{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-enterprise",
  "title": "Pricing Enterprise",
  "description": "Single wide enterprise pricing panel with an editable trust-logo wall.",
  "registryDependencies": [
    "badge"
  ],
  "files": [
    {
      "path": "payload-components/source/blocks/shared/pricingFields.ts",
      "content": "import type { Field } from 'payload'\n\nimport { linkGroup } from '@/fields/linkGroup'\n\n/**\n * Shared field core for the Pricing component family.\n *\n * Every pricing variant (pricing-cards, pricing-cards-muted, pricing-cards-cta,\n * pricing-split, pricing-enterprise) spreads `pricingFields` for the section\n * heading and reuses `planFields` for the editable plan array. Editing the\n * shared shape here updates every installed pricing block at once, so the\n * family never drifts field-by-field across a repo.\n *\n * Each plan carries its own price, period, blurb, a `featured` flag (which\n * drives the emerald \"Popular\" highlight), a list of included features, and a\n * single CTA link group — so editors manage the whole pricing table from the\n * admin instead of shipping hardcoded copy.\n *\n * The layout structure is adapted from tailark/blocks (MIT) pricing blocks,\n * retokenized onto this repo's monochrome + emerald design system.\n *\n * Installed once per repo at `src/blocks/shared/pricingFields.ts`; re-running\n * `payload-components add pricing-*` never overwrites a copy you have already edited.\n */\nexport const pricingFields: Field[] = [\n  {\n    name: 'eyebrow',\n    type: 'text',\n  },\n  {\n    name: 'title',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'description',\n    type: 'textarea',\n  },\n]\n\n/**\n * Subfields for one plan, reused as the `fields` of every variant's `plans`\n * array. `period` is optional (a one-off enterprise price may omit \"/ mo\"),\n * `featured` marks the highlighted column, and `link` is a single CTA group.\n */\nexport const planFields: Field[] = [\n  {\n    name: 'name',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'price',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'period',\n    type: 'text',\n  },\n  {\n    name: 'description',\n    type: 'text',\n  },\n  {\n    name: 'featured',\n    type: 'checkbox',\n    defaultValue: false,\n  },\n  {\n    name: 'features',\n    type: 'array',\n    required: true,\n    minRows: 1,\n    maxRows: 12,\n    admin: {\n      initCollapsed: true,\n    },\n    fields: [\n      {\n        name: 'feature',\n        type: 'text',\n        required: true,\n      },\n    ],\n  },\n  linkGroup({\n    overrides: {\n      admin: {\n        initCollapsed: true,\n      },\n      maxRows: 1,\n    },\n  }),\n]\n",
      "type": "registry:file",
      "target": "~/src/blocks/shared/pricingFields.ts"
    },
    {
      "path": "payload-components/source/blocks/PricingEnterprise/config.ts",
      "content": "import type { Block } from 'payload'\n\nimport { planFields, pricingFields } from '@/blocks/shared/pricingFields'\n\nexport const PricingEnterprise: Block = {\n  slug: 'pricingEnterprise',\n  // Existing apps must migrate stored data before adopting this identifier:\n  // https://www.payload-components.xyz/docs/registry#installed-source-and-migrations\n  dbName: 'pc_pri_ent',\n  interfaceName: 'PricingEnterpriseBlock',\n  fields: [\n    // Shared pricing heading (eyebrow, title, description). Variant-specific\n    // fields follow; edit the shared shape in @/blocks/shared/pricingFields.\n    ...pricingFields,\n    {\n      name: 'plans',\n      type: 'array',\n      required: true,\n      // A single enterprise plan rendered as one wide panel.\n      minRows: 1,\n      maxRows: 1,\n      admin: {\n        initCollapsed: true,\n      },\n      fields: planFields,\n    },\n    {\n      // Editable trust logos — uploaded images with an accessible name and an\n      // optional link, mirroring the shared logo-cloud shape so editors insert\n      // their own brand marks instead of shipping hardcoded SVGs.\n      name: 'logos',\n      type: 'array',\n      minRows: 0,\n      maxRows: 8,\n      admin: {\n        initCollapsed: true,\n      },\n      fields: [\n        {\n          name: 'logo',\n          type: 'upload',\n          relationTo: 'media',\n          required: true,\n        },\n        {\n          name: 'name',\n          type: 'text',\n          required: true,\n        },\n        {\n          name: 'href',\n          type: 'text',\n          // Logos link out to arbitrary customer sites, so this can't reuse the\n          // embed/form allowlists in shared/safeUrls — but still reject anything\n          // that isn't an absolute http(s) URL (e.g. a `javascript:` payload).\n          validate: (value: unknown) => {\n            if (value === null || value === undefined || value === '') return true\n\n            try {\n              const { protocol } = new URL(String(value))\n\n              return protocol === 'https:' || protocol === 'http:'\n                ? true\n                : 'Use an absolute http(s) URL.'\n            } catch {\n              return 'Use an absolute http(s) URL.'\n            }\n          },\n        },\n      ],\n    },\n  ],\n  labels: {\n    plural: 'Pricing Enterprise Blocks',\n    singular: 'Pricing Enterprise',\n  },\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/PricingEnterprise/config.ts"
    },
    {
      "path": "payload-components/source/blocks/PricingEnterprise/Component.tsx",
      "content": "import { Check } from 'lucide-react'\nimport React from 'react'\n\nimport type { PricingEnterpriseBlock as PricingEnterpriseBlockData } from '@/payload-types'\n\nimport { CMSLink } from '@/components/Link'\nimport { Media } from '@/components/Media'\nimport { Badge } from '@/components/ui/badge'\nimport { cn } from '@/utilities/ui'\n\n// Layout adapted from tailark/blocks (MIT) — re-implemented as a Payload block.\n\ntype Props = PricingEnterpriseBlockData & {\n  id?: string\n  className?: string\n  disableInnerContainer?: boolean\n}\n\nexport const PricingEnterpriseBlock: React.FC<Props> = ({\n  className,\n  description,\n  disableInnerContainer,\n  eyebrow,\n  id,\n  logos,\n  plans,\n  title,\n}) => {\n  const plan = plans?.[0]\n\n  return (\n    <section className={cn('container', className)} id={id ? `block-${id}` : undefined}>\n      <div className=\"overflow-hidden rounded-frame border border-border/70 bg-card/35 px-6 py-10 sm:px-8 lg:px-12 lg:py-14\">\n        <div\n          className={cn('flex flex-col gap-10', {\n            'mx-auto max-w-5xl': !disableInnerContainer,\n          })}\n        >\n          <div className=\"mx-auto flex max-w-2xl flex-col gap-4 text-center\">\n            {eyebrow ? (\n              <Badge variant=\"outline\" className=\"mx-auto w-fit rounded-full px-3 py-1 uppercase tracking-eyebrow\">\n                {eyebrow}\n              </Badge>\n            ) : null}\n\n            <h2 className=\"text-4xl font-medium tracking-display text-balance sm:text-5xl\">{title}</h2>\n\n            {description ? (\n              <p className=\"text-base leading-7 text-muted-foreground sm:text-lg\">{description}</p>\n            ) : null}\n          </div>\n\n          {plan ? (\n            <div className=\"rounded-frame border border-border/70 bg-background/60 shadow-none\">\n              <div className=\"grid items-center gap-12 divide-y divide-border/70 p-8 sm:p-12 md:grid-cols-2 md:divide-x md:divide-y-0\">\n                <div className=\"flex flex-col items-center gap-4 text-center md:pe-12\">\n                  <h3 className=\"text-2xl font-semibold tracking-title\">{plan.name}</h3>\n                  {plan.description ? (\n                    <p className=\"text-base text-muted-foreground\">{plan.description}</p>\n                  ) : null}\n                  <div className=\"my-4 flex items-baseline justify-center gap-1\">\n                    <span className=\"text-5xl font-bold\">{plan.price}</span>\n                    {plan.period ? (\n                      <span className=\"text-base text-muted-foreground\">{plan.period}</span>\n                    ) : null}\n                  </div>\n\n                  {plan.links && plan.links.length > 0 ? (\n                    <div className=\"flex flex-col gap-2\">\n                      {plan.links.map(({ link }, linkIndex) => (\n                        <CMSLink key={linkIndex} {...link} appearance=\"default\" />\n                      ))}\n                    </div>\n                  ) : null}\n                </div>\n\n                <div className=\"flex flex-col gap-6 md:ps-12\">\n                  {plan.features && plan.features.length > 0 ? (\n                    <ul className=\"flex flex-col gap-4 text-sm\">\n                      {plan.features.map((item, featureIndex) => (\n                        <li\n                          key={item.id ?? `${item.feature}-${featureIndex}`}\n                          className=\"flex items-center gap-2\"\n                        >\n                          <Check aria-hidden=\"true\" className=\"size-3\" />\n                          {item.feature}\n                        </li>\n                      ))}\n                    </ul>\n                  ) : null}\n\n                  {logos && logos.length > 0 ? (\n                    <div className=\"flex flex-wrap items-center gap-x-10 gap-y-6 pt-2\">\n                      {logos.map((item, index) => {\n                        const logo = (\n                          <Media resource={item.logo} imgClassName=\"h-6 w-auto object-contain\" />\n                        )\n\n                        return (\n                          <div className=\"flex items-center\" key={item.id ?? `${item.name}-${index}`}>\n                            {item.href ? (\n                              <a aria-label={item.name} href={item.href}>\n                                {logo}\n                              </a>\n                            ) : (\n                              logo\n                            )}\n                          </div>\n                        )\n                      })}\n                    </div>\n                  ) : null}\n                </div>\n              </div>\n            </div>\n          ) : null}\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/PricingEnterprise/Component.tsx"
    }
  ],
  "meta": {
    "payloadComponent": {
      "installCommand": "payload-components add pricing-enterprise",
      "postInstall": [
        "generate:types",
        "generate:importmap"
      ],
      "requiresPayloadComponentWrapper": true,
      "supportedTargets": [
        "payload-website-starter",
        "payload-blocks-app"
      ]
    }
  },
  "docs": "Payload Components installs this as a Payload CMS block for the Payload website starter shape.\n\nRecommended install:\n\n```bash\npnpm payload-components add pricing-enterprise\n```\n\nDirect shadcn install URL:\n\n```bash\npnpm dlx shadcn@latest add https://<your-domain>/r/pricing-enterprise.json\n```\n\nDirect shadcn installs only copy the block source files and shadcn UI dependencies. Use `payload-components add pricing-enterprise` when you also want Payload layout registration, `RenderBlocks` wiring, `generate:types`, and `generate:importmap` handled for you.",
  "type": "registry:block"
}