{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-social-links",
  "title": "Social Links",
  "description": "Linha acessível de canais sociais e comunitários com variantes visuais e detecção de ícones.",
  "dependencies": [
    "class-variance-authority",
    "lucide-react"
  ],
  "files": [
    {
      "path": "components/ds/ds-social-links.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Mail, MessageCircle, Globe, type LucideIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\n// ── Types ──\n\nexport type SocialPlatform =\n  | \"github\"\n  | \"twitter\"\n  | \"x\"\n  | \"linkedin\"\n  | \"youtube\"\n  | \"instagram\"\n  | \"discord\"\n  | \"bluesky\"\n  | \"whatsapp\"\n  | \"email\"\n  | \"website\"\n\nexport interface SocialLinkItem {\n  platform: SocialPlatform\n  href: string\n  label?: string\n}\n\nexport interface SocialLinksProps\n  extends\n    React.HTMLAttributes<HTMLElement>,\n    VariantProps<typeof socialLinksVariants> {\n  links: SocialLinkItem[]\n  shape?: \"circle\" | \"rounded\" | \"square\"\n  gap?: \"sm\" | \"md\" | \"lg\"\n  navLabel?: string\n}\n\n// ── Variants ──\n\nexport const socialLinksVariants = cva(\"flex items-center\", {\n  variants: {\n    variant: {\n      ghost: \"text-muted-foreground hover:bg-muted hover:text-foreground\",\n      outline:\n        \"border border-border text-muted-foreground hover:border-foreground/20 hover:bg-muted hover:text-foreground\",\n      muted:\n        \"bg-muted/60 text-muted-foreground hover:bg-muted hover:text-foreground\",\n    },\n    size: {\n      sm: \"size-7 [&_svg]:size-3.5\",\n      md: \"size-8 [&_svg]:size-4\",\n      lg: \"size-9 [&_svg]:size-4.5\",\n    },\n  },\n  defaultVariants: {\n    variant: \"ghost\",\n    size: \"md\",\n  },\n})\n\n// ── Helpers ──\n\nfunction GithubIcon(props: React.SVGProps<SVGSVGElement>) {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {...props}>\n      <path\n        fillRule=\"evenodd\"\n        clipRule=\"evenodd\"\n        d=\"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z\"\n      />\n    </svg>\n  )\n}\n\nfunction LinkedinIcon(props: React.SVGProps<SVGSVGElement>) {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {...props}>\n      <path d=\"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.28 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.75M6.46 10.9v8.37H9.2V10.9H6.46M7.83 6.88a1.64 1.64 0 1 0 0 3.28 1.64 1.64 0 0 0 0-3.28\" />\n    </svg>\n  )\n}\n\nfunction YoutubeIcon(props: React.SVGProps<SVGSVGElement>) {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {...props}>\n      <path d=\"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z\" />\n    </svg>\n  )\n}\n\nfunction InstagramIcon(props: React.SVGProps<SVGSVGElement>) {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {...props}>\n      <path d=\"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z\" />\n    </svg>\n  )\n}\n\nfunction XIcon(props: React.SVGProps<SVGSVGElement>) {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {...props}>\n      <path d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\" />\n    </svg>\n  )\n}\n\nfunction DiscordIcon(props: React.SVGProps<SVGSVGElement>) {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {...props}>\n      <path d=\"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994.021-.041.001-.09-.041-.106a13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.929 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.894.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.028zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z\" />\n    </svg>\n  )\n}\n\nfunction BlueskyIcon(props: React.SVGProps<SVGSVGElement>) {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {...props}>\n      <path d=\"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566 1.01 1.5 1.7 1.5 4.5c0 1.5.3 6.5 1.5 8 1.8 2.2 4.5 2.5 6 1.5-1.5 1.5-3.5 4-1 6.5 3 3 4-2 4-2s1 5 4 2c2.5-2.5.5-5-1-6.5 1.5 1 4.2.7 6-1.5 1.2-1.5 1.5-6.5 1.5-8 0-2.8-1.066-3.49-3.702-1.695C16.046 4.747 13.087 8.686 12 10.8z\" />\n    </svg>\n  )\n}\n\nconst PLATFORM_CONFIG: Record<\n  SocialPlatform,\n  {\n    label: string\n    icon: LucideIcon | React.ComponentType<React.SVGProps<SVGSVGElement>>\n  }\n> = {\n  github: { label: \"GitHub\", icon: GithubIcon },\n  twitter: { label: \"X (Twitter)\", icon: XIcon },\n  x: { label: \"X\", icon: XIcon },\n  linkedin: { label: \"LinkedIn\", icon: LinkedinIcon },\n  youtube: { label: \"YouTube\", icon: YoutubeIcon },\n  instagram: { label: \"Instagram\", icon: InstagramIcon },\n  discord: { label: \"Discord\", icon: DiscordIcon },\n  bluesky: { label: \"Bluesky\", icon: BlueskyIcon },\n  whatsapp: { label: \"WhatsApp\", icon: MessageCircle },\n  email: { label: \"Email\", icon: Mail },\n  website: { label: \"Website\", icon: Globe },\n}\n\nconst SHAPE_CLASSES = {\n  circle: \"rounded-full\",\n  rounded: \"rounded-lg\",\n  square: \"rounded-none\",\n}\n\nconst GAP_CLASSES = {\n  sm: \"gap-1\",\n  md: \"gap-1.5\",\n  lg: \"gap-2\",\n}\n\n// ── Component ──\n\nexport const SocialLinks = React.forwardRef<HTMLElement, SocialLinksProps>(\n  (\n    {\n      links,\n      variant = \"ghost\",\n      size = \"md\",\n      gap = \"md\",\n      shape = \"circle\",\n      navLabel = \"Canais e redes sociais\",\n      className,\n      ...props\n    },\n    ref\n  ) => {\n    return (\n      <nav\n        ref={ref}\n        aria-label={navLabel}\n        className={cn(\"flex items-center\", className)}\n        {...props}\n      >\n        <ul className={cn(\"flex flex-wrap items-center\", GAP_CLASSES[gap])}>\n          {links.map((item, index) => {\n            const config = PLATFORM_CONFIG[item.platform]\n            const Icon = config?.icon || Globe\n            const label = item.label || config?.label || item.platform\n\n            return (\n              <li key={`${item.platform}-${index}`}>\n                <a\n                  href={item.href}\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                  aria-label={label}\n                  title={label}\n                  className={cn(\n                    \"inline-flex items-center justify-center transition-colors outline-none\",\n                    \"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n                    socialLinksVariants({ variant, size }),\n                    SHAPE_CLASSES[shape]\n                  )}\n                >\n                  <Icon className=\"shrink-0\" />\n                </a>\n              </li>\n            )\n          })}\n        </ul>\n      </nav>\n    )\n  }\n)\nSocialLinks.displayName = \"SocialLinks\"\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
