import { createMemo, type Component } from "solid-js" import { Laptop, Moon, Sun } from "lucide-solid" import { useI18n } from "../lib/i18n" import { useTheme } from "../lib/theme" interface ThemeModeToggleProps { class?: string } export const ThemeModeToggle: Component = (props) => { const { t } = useI18n() const { themeMode, cycleThemeMode } = useTheme() const modeLabel = () => { const mode = themeMode() if (mode === "system") return t("theme.mode.system") if (mode === "light") return t("theme.mode.light") return t("theme.mode.dark") } const icon = createMemo(() => { const mode = themeMode() if (mode === "system") return if (mode === "light") return return }) return ( ) }