{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "theme-switcher-toggle",
  "title": "Theme Switcher Toggle",
  "description": "Custom toggle theme switcher with sliding animation",
  "dependencies": [
    "next-themes"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/default/blocks/theme-switcher/theme-switcher-toggle/components/elements/theme-switcher-toggle.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\ninterface ThemeSwitcherToggleProps\n  extends React.HTMLAttributes<HTMLDivElement> {\n  className?: string;\n}\n\nexport function ThemeSwitcherToggle({\n  className,\n  ...props\n}: ThemeSwitcherToggleProps) {\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      <div className={cn(\"flex items-center space-x-2\", className)} {...props}>\n        <div className=\"w-10 h-6 bg-input rounded-full animate-pulse\" />\n      </div>\n    );\n  }\n\n  const toggleTheme = () => {\n    setTheme(theme === \"dark\" ? \"light\" : \"dark\");\n  };\n\n  const isDark = theme === \"dark\";\n\n  return (\n    <div className={cn(\"flex items-center space-x-2\", className)} {...props}>\n      <button\n        type=\"button\"\n        onClick={toggleTheme}\n        className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 ${\n          isDark ? \"bg-primary\" : \"bg-muted\"\n        }`}\n      >\n        <span className=\"sr-only\">Toggle theme</span>\n        <span\n          className={`inline-block h-4 w-4 transform rounded-full bg-background transition duration-200 ease-in-out ${\n            isDark ? \"translate-x-6\" : \"translate-x-1\"\n          }`}\n        >\n          {isDark ? (\n            <MoonIcon className=\"h-3 w-3 text-foreground mt-0.5 ml-0.5\" />\n          ) : (\n            <SunIcon className=\"h-3 w-3 text-foreground mt-0.5 ml-0.5\" />\n          )}\n        </span>\n      </button>\n    </div>\n  );\n}\n",
      "type": "registry:component"
    },
    {
      "path": "registry/default/blocks/theme-switcher/theme-switcher-toggle/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-toggle/routes/page.tsx",
      "content": "\"use client\";\n\nimport { ThemeSwitcherToggle } from \"@/registry/default/blocks/theme-switcher/theme-switcher-toggle/components/elements/theme-switcher-toggle\";\n\nexport default function ThemeSwitcherTogglePage() {\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 Toggle</h1>\n            <p className=\"text-muted-foreground\">\n              A custom toggle theme switcher with sliding animation and smooth\n              transitions.\n            </p>\n          </div>\n\n          <div className=\"flex justify-center\">\n            <ThemeSwitcherToggle />\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>• Custom built toggle component</li>\n              <li>• Smooth sliding animation</li>\n              <li>• Sun/moon icon transitions</li>\n              <li>• No external dependencies</li>\n              <li>• Loading state with skeleton</li>\n            </ul>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:page",
      "target": "app/theme-switcher-toggle/page.tsx"
    }
  ],
  "docs": "⚠️ Requires ThemeProvider setup! Wrap your app with <ThemeProvider> and add suppressHydrationWarning to <html>. Custom toggle with sliding animation.",
  "type": "registry:ui"
}