import { createContext } from 'react'; export interface User { user_id: number; role: 'admin' | 'user' | 'passthrough'; name?: string; email?: string; } export interface AuthContextType { user: User | null; login: (token?: string) => Promise; logout: () => void; changePassword: (oldPassword: string, newPassword: string) => Promise; isAuthenticated: boolean; isLoading: boolean; } export const AuthContext = createContext(undefined);