import { create } from "zustand" import type { UserRole } from "@/lib/types" interface AuthState { isAuthenticated: boolean currentRole: UserRole verifiedRoles: UserRole[] switchRole: (role: UserRole) => void login: () => void logout: () => void } export const useAuthStore = create((set) => ({ isAuthenticated: false, currentRole: "consumer", verifiedRoles: ["consumer"], switchRole: (role) => set({ currentRole: role }), login: () => set({ isAuthenticated: true }), logout: () => set({ isAuthenticated: false, currentRole: "consumer" }), }))