import IconButton from "@mui/material/IconButton"; import { useAppDispatch, useAppSelector } from "@/hooks/AppHooks"; import { setMode } from "@/features/uiSlice.js"; import { useTranslation } from "react-i18next"; import { Moon, Sun } from "lucide-react"; import { useTheme } from "@mui/material/styles"; import { Tooltip } from "@/components/design-elements"; export const ThemeSwitch = () => { const mode = useAppSelector((state: any) => state.ui.mode); const dispatch = useAppDispatch(); const { t } = useTranslation(); const theme = useTheme(); const handleChange = () => { dispatch(setMode(mode === "light" ? "dark" : "light")); }; return ( {mode === "light" ? ( ) : ( )} ); };