{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "theme-switcher-button",
  "title": "Theme Switcher Button",
  "description": "Button-based theme switcher with rotating icons",
  "dependencies": [
    "next-themes"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/default/blocks/theme-switcher/theme-switcher-button/components/elements/theme-switcher-button.tsx",
      "content": "\"use client\";\n\nimport type React from \"react\";\nimport { useEffect, useState } from \"react\";\n\nimport { MoonIcon, SunIcon } from \"lucide-react\";\nimport { useTheme } from \"next-themes\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Button } from \"@/components/ui/button\";\n\ninterface ThemeSwitcherButtonProps\n  extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n  className?: string;\n}\n\nexport function ThemeSwitcherButton({\n  className,\n  ...props\n}: ThemeSwitcherButtonProps) {\n  const { theme, setTheme } = useTheme();\n  const [mounted, setMounted] = useState(false);\n\n  useEffect(() => {\n    setMounted(true);\n  }, []);\n\n  if (!mounted) {\n    return (\n      <Button variant=\"outline\" size=\"icon\" disabled className={className}>\n        <div className=\"w-4 h-4 bg-input rounded animate-pulse\" />\n      </Button>\n    );\n  }\n\n  const toggleTheme = () => {\n    setTheme(theme === \"dark\" ? \"light\" : \"dark\");\n  };\n\n  const isDark = theme === \"dark\";\n\n  return (\n    <Button\n      variant=\"outline\"\n      size=\"icon\"\n      onClick={toggleTheme}\n      className={cn(\"relative overflow-hidden\", className)}\n      {...props}\n    >\n      <SunIcon\n        className={`w-4 h-4 transition-all duration-300 ${\n          isDark\n            ? \"rotate-90 scale-0 opacity-0\"\n            : \"rotate-0 scale-100 opacity-100\"\n        }`}\n      />\n      <MoonIcon\n        className={`absolute w-4 h-4 transition-all duration-300 ${\n          isDark\n            ? \"rotate-0 scale-100 opacity-100\"\n            : \"-rotate-90 scale-0 opacity-0\"\n        }`}\n      />\n      <span className=\"sr-only\">Toggle theme</span>\n    </Button>\n  );\n}\n",
      "type": "registry:component"
    },
    {
      "path": "registry/default/blocks/theme-switcher/theme-switcher-button/routes/layout.tsx",
      "content": "import { Geist, Geist_Mono } from \"next/font/google\";\n\nimport { ThemeProvider } from \"next-themes\";\n\nconst geistSans = Geist({\n  variable: \"--font-geist-sans\",\n  subsets: [\"latin\"],\n});\n\nconst geistMono = Geist_Mono({\n  variable: \"--font-geist-mono\",\n  subsets: [\"latin\"],\n});\n\nexport default function RootLayout({\n  children,\n}: Readonly<{\n  children: React.ReactNode;\n}>) {\n  return (\n    <html lang=\"en\" suppressHydrationWarning>\n      <body\n        className={`${geistSans.variable} ${geistMono.variable} antialiased`}\n      >\n        <ThemeProvider\n          attribute=\"class\"\n          defaultTheme=\"system\"\n          enableSystem\n          disableTransitionOnChange\n        >\n          {children}\n        </ThemeProvider>\n      </body>\n    </html>\n  );\n}\n",
      "type": "registry:page",
      "target": "app/layout.tsx"
    },
    {
      "path": "registry/default/blocks/theme-switcher/theme-switcher-button/routes/page.tsx",
      "content": "\"use client\";\n\nimport { ThemeSwitcherButton } from \"@/registry/default/blocks/theme-switcher/theme-switcher-button/components/elements/theme-switcher-button\";\n\nexport default function ThemeSwitcherButtonPage() {\n  return (\n    <div className=\"min-h-screen bg-background text-foreground\">\n      <div className=\"container mx-auto px-4 py-16\">\n        <div className=\"max-w-2xl mx-auto text-center space-y-8\">\n          <div className=\"space-y-4\">\n            <h1 className=\"text-3xl font-bold\">Theme Switcher Button</h1>\n            <p className=\"text-muted-foreground\">\n              A button-based theme switcher with rotating sun/moon icons and\n              smooth transitions.\n            </p>\n          </div>\n\n          <div className=\"flex justify-center\">\n            <ThemeSwitcherButton />\n          </div>\n\n          <div className=\"bg-card border rounded-lg p-6 text-left space-y-4\">\n            <h2 className=\"text-lg font-semibold\">Features</h2>\n            <ul className=\"space-y-2 text-sm text-muted-foreground\">\n              <li>• Animated sun/moon icon transitions</li>\n              <li>• Smooth rotation and scaling effects</li>\n              <li>• Loading state with skeleton</li>\n              <li>• Accessible with screen reader support</li>\n              <li>• Toggle between light and dark themes</li>\n            </ul>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:page",
      "target": "app/theme-switcher-button/page.tsx"
    }
  ],
  "docs": "⚠️ Requires ThemeProvider setup! Wrap your app with <ThemeProvider> and add suppressHydrationWarning to <html>. Button-based theme switcher with rotating icons.",
  "type": "registry:ui"
}