"use client" import { setTheme as setTauriTheme } from "@/hooks/tauri/theme" import { useAppStore } from "@/store/app" import { useToolStore } from "@/store/tool" import { addToast } from "@heroui/react" import { Close, Minus, Moon, Refresh, RocketOne, Square, SunOne } from "@icon-park/react" import { type Theme, getCurrentWindow } from "@tauri-apps/api/window" import { /* relaunch, */ exit } from "@tauri-apps/plugin-process" import { useTheme } from "next-themes" import { usePathname, useRouter } from "next/navigation" import { saveAllNow } from "@tauri-store/valtio" import { useSteamStore } from "@/store/steam" const Nav = () => { const app = useAppStore() const tool = useToolStore() const steam = useSteamStore() const { theme, setTheme } = useTheme() const setAppTheme = async (theme: Theme) => { setTheme(theme) await setTauriTheme(theme) } const close = async () => { // (await window.hideOnClose) ? getCurrent().hide() : exit(); await saveAllNow() await exit() } const minimize = async () => { await saveAllNow() await getCurrentWindow().minimize() } const toggleMaximize = async () => { const current = getCurrentWindow() const maximized = await current.isMaximized() await (maximized ? current.unmaximize() : current.maximize()) } // const reset = async () => { // await relaunch() // } const router = useRouter() const pathname = usePathname() return ( ) } export default Nav