{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "share-section",
  "type": "registry:component",
  "title": "Share Section",
  "description": "Social sharing buttons and link copy section.",
  "dependencies": [
    "@vllnt/ui@^0.2.1"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/default/share-section/share-section.tsx",
      "content": "export type SharePlatform =\n  | \"bluesky\"\n  | \"facebook\"\n  | \"linkedin\"\n  | \"mastodon\"\n  | \"threads\"\n  | \"x\";\n\nexport type PlatformConfig = {\n  key: SharePlatform;\n  label: string;\n};\n\nconst defaultPlatforms: PlatformConfig[] = [\n  { key: \"x\", label: \"X\" },\n  { key: \"linkedin\", label: \"LinkedIn\" },\n  { key: \"facebook\", label: \"Facebook\" },\n  { key: \"mastodon\", label: \"Mastodon\" },\n  { key: \"bluesky\", label: \"Bluesky\" },\n  { key: \"threads\", label: \"Threads\" },\n];\n\nfunction buildShareUrl(\n  platform: SharePlatform,\n  url: string,\n  title: string,\n): string {\n  const encodedUrl = encodeURIComponent(url);\n  const encodedTitle = encodeURIComponent(title);\n\n  switch (platform) {\n    case \"x\":\n      return `https://twitter.com/intent/tweet?url=${encodedUrl}&text=${encodedTitle}`;\n    case \"linkedin\":\n      return `https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl}`;\n    case \"facebook\":\n      return `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`;\n    case \"mastodon\":\n      return `https://mastodon.social/share?text=${encodedTitle}%20${encodedUrl}`;\n    case \"bluesky\":\n      return `https://bsky.app/intent/compose?text=${encodedTitle}%20${encodedUrl}`;\n    case \"threads\":\n      return `https://www.threads.net/intent/post?text=${encodedTitle}%20${encodedUrl}`;\n  }\n}\n\ntype ShareSectionProps = {\n  buildUrl?: (platform: SharePlatform, url: string, title: string) => string;\n  platforms?: PlatformConfig[];\n  shareOn: string;\n  shareTitle: string;\n  title: string;\n  url: string;\n};\n\nexport function ShareSection({\n  buildUrl: buildUrlFunction = buildShareUrl,\n  platforms = defaultPlatforms,\n  shareOn,\n  shareTitle,\n  title,\n  url,\n}: ShareSectionProps) {\n  return (\n    <div className=\"border-t border-border pt-6 mt-8\">\n      <h3 className=\"text-lg font-semibold mb-4\">{shareTitle}</h3>\n      <div className=\"flex flex-wrap gap-3\">\n        {platforms.map((platform) => (\n          <a\n            className=\"text-sm text-muted-foreground hover:text-foreground transition-colors border border-border px-3 py-1.5 hover:bg-accent rounded-md\"\n            href={buildUrlFunction(platform.key, url, title)}\n            key={platform.key}\n            rel=\"noopener noreferrer\"\n            target=\"_blank\"\n          >\n            {shareOn} {platform.label}\n          </a>\n        ))}\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "version": "0.2.1",
  "stability": "stable"
}
