{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "footer",
  "type": "registry:ui",
  "title": "Footer",
  "author": "Rishabh Bose <https://theb0se.vercel.app/>",
  "description": "Comprehensive kinetic multi-column footer featuring an interactive newsletter subscription form, magnetic social buttons, live system status, and responsive navigation links.",
  "dependencies": [
    "framer-motion",
    "lucide-react",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "components/ui/footer.tsx",
      "content": "\"use client\";\n\nimport React, { useState } from \"react\";\nimport { motion, useReducedMotion } from \"framer-motion\";\nimport {\n  ArrowRight,\n  Check,\n  Github,\n  Twitter,\n  Linkedin,\n  Disc as Discord,\n  Sparkles,\n  Loader2,\n} from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface FooterLink {\n  label: string;\n  href: string;\n  badge?: string;\n  external?: boolean;\n}\n\nexport interface FooterColumn {\n  title: string;\n  links: FooterLink[];\n}\n\nexport interface FooterSocial {\n  name: string;\n  href: string;\n  icon: React.ComponentType<{ className?: string }>;\n}\n\nexport interface FooterProps extends React.HTMLAttributes<HTMLElement> {\n  /** Brand product name */\n  brandName?: string;\n  /** Brand mission or tagline */\n  description?: string;\n  /** Custom logo node */\n  logo?: React.ReactNode;\n  /** Categorized navigation columns */\n  columns?: FooterColumn[];\n  /** Social profile links */\n  socials?: FooterSocial[];\n  /** Custom copyright text */\n  copyright?: string;\n  /** Live service operational status text */\n  statusText?: string;\n  /** Operational status state */\n  statusState?: \"operational\" | \"degraded\" | \"maintenance\";\n  /** Whether to render the kinetic newsletter signup box */\n  showNewsletter?: boolean;\n  /** Newsletter submission handler */\n  onNewsletterSubmit?: (email: string) => Promise<boolean> | boolean | void;\n  /** Optional custom class name */\n  className?: string;\n}\n\nconst DEFAULT_COLUMNS: FooterColumn[] = [\n  {\n    title: \"Product\",\n    links: [\n      { label: \"Primitives\", href: \"#primitives\", badge: \"106+\" },\n      { label: \"Blocks\", href: \"#blocks\" },\n      { label: \"Design System\", href: \"#tokens\" },\n      { label: \"Changelog\", href: \"#changelog\" },\n    ],\n  },\n  {\n    title: \"Resources\",\n    links: [\n      { label: \"Documentation\", href: \"#docs\" },\n      { label: \"Components CLI\", href: \"#cli\" },\n      { label: \"Interactive Demos\", href: \"#demos\" },\n      { label: \"GitHub Repo\", href: \"https://github.com/Theb0se/bose-ui\", external: true },\n    ],\n  },\n  {\n    title: \"Company\",\n    links: [\n      { label: \"About Rishabh\", href: \"https://theb0se.vercel.app/\", external: true },\n      { label: \"Careers\", href: \"#careers\", badge: \"We're hiring\" },\n      { label: \"Privacy Policy\", href: \"#privacy\" },\n      { label: \"Terms of Service\", href: \"#terms\" },\n    ],\n  },\n];\n\nconst DEFAULT_SOCIALS: FooterSocial[] = [\n  { name: \"GitHub\", href: \"https://github.com/Theb0se/bose-ui\", icon: Github },\n  { name: \"Twitter\", href: \"https://x.com\", icon: Twitter },\n  { name: \"Discord\", href: \"https://discord.com\", icon: Discord },\n  { name: \"LinkedIn\", href: \"https://linkedin.com\", icon: Linkedin },\n];\n\nexport function Footer({\n  brandName = \"BoseUI\",\n  description = \"Kinetic UI components engineered to make modern web interfaces feel alive and tactile.\",\n  logo,\n  columns = DEFAULT_COLUMNS,\n  socials = DEFAULT_SOCIALS,\n  copyright,\n  statusText = \"All systems operational\",\n  statusState = \"operational\",\n  showNewsletter = true,\n  onNewsletterSubmit,\n  className,\n  ...props\n}: FooterProps) {\n  const [email, setEmail] = useState(\"\");\n  const [newsletterStatus, setNewsletterStatus] = useState<\n    \"idle\" | \"loading\" | \"success\" | \"error\"\n  >(\"idle\");\n  const shouldReduceMotion = useReducedMotion();\n\n  const handleSubscribe = async (e: React.FormEvent) => {\n    e.preventDefault();\n    if (!email || !email.includes(\"@\")) return;\n\n    setNewsletterStatus(\"loading\");\n    try {\n      if (onNewsletterSubmit) {\n        await onNewsletterSubmit(email);\n      } else {\n        // Simulated network delay\n        await new Promise((res) => setTimeout(res, 600));\n      }\n      setNewsletterStatus(\"success\");\n      setEmail(\"\");\n    } catch {\n      setNewsletterStatus(\"error\");\n    }\n  };\n\n  const statusColors = {\n    operational: \"bg-emerald-500\",\n    degraded: \"bg-amber-500\",\n    maintenance: \"bg-blue-500\",\n  };\n\n  return (\n    <footer\n      role=\"contentinfo\"\n      aria-label=\"Site Footer\"\n      className={cn(\n        \"relative w-full border-t border-neutral-200/80 bg-neutral-50/70 pt-16 pb-12 text-neutral-900 dark:border-neutral-800/80 dark:bg-neutral-950/70 dark:text-neutral-100\",\n        className\n      )}\n      {...props}\n    >\n      <div className=\"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8\">\n        {/* Top Grid Section */}\n        <div className=\"grid grid-cols-1 gap-12 lg:grid-cols-12 lg:gap-8\">\n          {/* Brand & Newsletter Column */}\n          <div className=\"flex flex-col gap-6 lg:col-span-5\">\n            <div className=\"flex items-center gap-2.5\">\n              {logo || (\n                <div className=\"flex h-9 w-9 items-center justify-center rounded-xl bg-neutral-950 text-white shadow-md dark:bg-white dark:text-neutral-950\">\n                  <Sparkles className=\"h-4 w-4\" />\n                </div>\n              )}\n              <span className=\"text-xl font-bold tracking-tight text-neutral-950 dark:text-white\">\n                {brandName}\n              </span>\n            </div>\n\n            <p className=\"max-w-sm text-sm leading-relaxed text-neutral-600 dark:text-neutral-400\">\n              {description}\n            </p>\n\n            {/* Newsletter Subscription */}\n            {showNewsletter && (\n              <div className=\"max-w-md\">\n                <form\n                  onSubmit={handleSubscribe}\n                  className=\"relative flex items-center\"\n                >\n                  <input\n                    type=\"email\"\n                    value={email}\n                    onChange={(e) => setEmail(e.target.value)}\n                    placeholder=\"Enter your email for releases...\"\n                    disabled={newsletterStatus === \"loading\" || newsletterStatus === \"success\"}\n                    aria-label=\"Email address for newsletter\"\n                    className=\"w-full rounded-xl border border-neutral-300 bg-white px-3.5 py-2.5 pr-28 text-xs text-neutral-900 placeholder-neutral-400 shadow-sm transition-all focus:border-neutral-950 focus:outline-none focus:ring-2 focus:ring-neutral-400 dark:border-neutral-700 dark:bg-neutral-900 dark:text-white dark:placeholder-neutral-500 dark:focus:border-white dark:focus:ring-neutral-600\"\n                  />\n                  <button\n                    type=\"submit\"\n                    disabled={newsletterStatus === \"loading\" || newsletterStatus === \"success\"}\n                    aria-label=\"Subscribe to newsletter\"\n                    className={cn(\n                      \"absolute right-1.5 inline-flex items-center justify-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-semibold transition-all active:scale-95\",\n                      newsletterStatus === \"success\"\n                        ? \"bg-emerald-600 text-white\"\n                        : \"bg-neutral-950 text-white hover:bg-neutral-800 dark:bg-white dark:text-neutral-950 dark:hover:bg-neutral-200\"\n                    )}\n                  >\n                    {newsletterStatus === \"loading\" ? (\n                      <Loader2 className=\"h-3.5 w-3.5 animate-spin\" />\n                    ) : newsletterStatus === \"success\" ? (\n                      <>\n                        <Check className=\"h-3.5 w-3.5\" />\n                        <span>Joined</span>\n                      </>\n                    ) : (\n                      <>\n                        <span>Join</span>\n                        <ArrowRight className=\"h-3 w-3\" />\n                      </>\n                    )}\n                  </button>\n                </form>\n                {newsletterStatus === \"success\" && (\n                  <p className=\"mt-1.5 text-[11px] font-medium text-emerald-600 dark:text-emerald-400\">\n                    Thank you for subscribing! We only send signal, no spam.\n                  </p>\n                )}\n              </div>\n            )}\n\n            {/* Operational System Status Pill */}\n            <div className=\"inline-flex items-center gap-2 rounded-full border border-neutral-200/90 bg-white/80 px-3 py-1 text-xs font-medium shadow-sm backdrop-blur-sm dark:border-neutral-800 dark:bg-neutral-900/80\">\n              <span className=\"relative flex h-2 w-2\">\n                <span\n                  className={cn(\n                    \"absolute inline-flex h-full w-full animate-ping rounded-full opacity-75\",\n                    statusColors[statusState]\n                  )}\n                />\n                <span\n                  className={cn(\n                    \"relative inline-flex h-2 w-2 rounded-full\",\n                    statusColors[statusState]\n                  )}\n                />\n              </span>\n              <span className=\"text-[11px] text-neutral-600 dark:text-neutral-300\">\n                {statusText}\n              </span>\n            </div>\n          </div>\n\n          {/* Navigation Links Columns */}\n          <div className=\"grid grid-cols-2 gap-8 sm:grid-cols-3 lg:col-span-7\">\n            {columns.map((column) => (\n              <div key={column.title} className=\"flex flex-col gap-3\">\n                <h4 className=\"text-xs font-bold uppercase tracking-wider text-neutral-950 dark:text-white\">\n                  {column.title}\n                </h4>\n                <ul className=\"flex flex-col gap-2.5\">\n                  {column.links.map((link) => (\n                    <li key={link.label}>\n                      <a\n                        href={link.href}\n                        target={link.external ? \"_blank\" : undefined}\n                        rel={link.external ? \"noreferrer noopener\" : undefined}\n                        className=\"group inline-flex items-center gap-1.5 text-xs text-neutral-600 transition-colors hover:text-neutral-950 dark:text-neutral-400 dark:hover:text-white\"\n                      >\n                        <motion.span\n                          whileHover={\n                            shouldReduceMotion ? undefined : { x: 3 }\n                          }\n                          transition={{\n                            type: \"spring\",\n                            stiffness: 400,\n                            damping: 25,\n                          }}\n                          className=\"flex items-center gap-1.5\"\n                        >\n                          {link.label}\n                        </motion.span>\n                        {link.badge && (\n                          <span className=\"rounded-full bg-neutral-200/80 px-1.5 py-0.2 text-[9px] font-semibold text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300\">\n                            {link.badge}\n                          </span>\n                        )}\n                      </a>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            ))}\n          </div>\n        </div>\n\n        {/* Bottom Bar: Copyright & Socials */}\n        <div className=\"mt-12 flex flex-col-reverse items-center justify-between gap-6 border-t border-neutral-200/80 pt-8 sm:flex-row dark:border-neutral-800/80\">\n          <p className=\"text-xs text-neutral-500 dark:text-neutral-400\">\n            {copyright ||\n              `© ${new Date().getFullYear()} ${brandName}. Open-source MIT License.`}\n          </p>\n\n          {/* Social Icons with Spring Hover */}\n          <div className=\"flex items-center gap-2\">\n            {socials.map((social) => {\n              const Icon = social.icon;\n              return (\n                <motion.a\n                  key={social.name}\n                  href={social.href}\n                  target=\"_blank\"\n                  rel=\"noreferrer noopener\"\n                  aria-label={social.name}\n                  whileHover={shouldReduceMotion ? undefined : { scale: 1.12, y: -2 }}\n                  whileTap={shouldReduceMotion ? undefined : { scale: 0.95 }}\n                  transition={{ type: \"spring\", stiffness: 450, damping: 25 }}\n                  className=\"flex h-8 w-8 items-center justify-center rounded-lg border border-neutral-200/80 bg-white text-neutral-600 shadow-sm transition-colors hover:border-neutral-400 hover:text-neutral-950 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-400 dark:hover:border-neutral-600 dark:hover:text-white\"\n                >\n                  <Icon className=\"h-4 w-4\" />\n                </motion.a>\n              );\n            })}\n          </div>\n        </div>\n      </div>\n    </footer>\n  );\n}\n\nexport default Footer;\n",
      "type": "registry:ui",
      "target": "components/ui/footer.tsx"
    },
    {
      "path": "lib/utils.ts",
      "content": "import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport async function copyToClipboard(text: string): Promise<boolean> {\n  if (typeof window === \"undefined\") return false;\n\n  try {\n    if (navigator.clipboard && window.isSecureContext) {\n      await navigator.clipboard.writeText(text);\n      return true;\n    }\n\n    const textArea = document.createElement(\"textarea\");\n    textArea.value = text;\n    textArea.style.position = \"fixed\";\n    textArea.style.left = \"-999999px\";\n    textArea.style.top = \"-999999px\";\n    document.body.appendChild(textArea);\n    textArea.focus();\n    textArea.select();\n    const succeeded = document.execCommand(\"copy\");\n    textArea.remove();\n    return succeeded;\n  } catch {\n    return false;\n  }\n}\n",
      "type": "registry:lib",
      "target": "lib/utils.ts"
    }
  ]
}
