/** * Navigation Store - tracks which view is active. * * Simple view routing for the desktop app. No URL-based routing needed * since this is a native app with a fixed set of views. */ import { create } from "zustand"; import { persist, createJSONStorage } from "zustand/middleware"; import { getStorage } from "@/lib/tauri-storage"; export type ViewId = "focus" | "queue" | "inbox" | "settings" | "debug"; export interface NavState { activeView: ViewId; setView: (view: ViewId) => void; } export const useNavStore = create()( persist( (set) => ({ activeView: "focus", setView: (view) => set({ activeView: view }), }), { name: "mc-nav-store", storage: createJSONStorage(() => getStorage()), } ) );