import React, { createContext, useContext, useEffect, useState } from 'react'; interface AuthContextType { user: any; loading: boolean; } const AuthContext = createContext(undefined); export const AuthProvider = ({ children }: { children: React.ReactNode }) => { const [user, setUser] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { // placeholder – replace with Firebase later setTimeout(() => { setUser(null); setLoading(false); }, 300); }, []); return ( {children} ); }; export const useAuth = () => { const ctx = useContext(AuthContext); if (!ctx) throw new Error('useAuth must be used within AuthProvider'); return ctx; };