"use client";
import { AnimatePresence, motion } from "framer-motion";
import { useTheme } from "next-themes";
import type { ComponentProps } from "react";
import { useEffect, useState } from "react";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
const themeMap = {
light: "light",
dark: "dark",
} as const;
function renderThemeIcon(theme: string | undefined) {
switch (theme) {
case themeMap.light:
return ;
case themeMap.dark:
return ;
default:
return null;
}
}
export function ThemeToggle(props: ComponentProps) {
const { setTheme, resolvedTheme } = useTheme();
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
}, []);
return (
);
}
const LightThemeIcon = () => {
return (
);
};
const DarkThemeIcon = () => {
return (
);
};