"use client" import type React from "react" import { createContext, useContext } from "react" import { useAuth, type User } from "@/lib/hooks/use-auth" interface AuthContextType { user: User | null login: (email: string, password: string) => Promise register: (userData: Omit & { password: string }) => Promise logout: () => void isLoading: boolean } const AuthContext = createContext(undefined) export function AuthProvider({ children }: { children: React.ReactNode }) { const auth = useAuth() return {children} } export function useAuthContext() { const context = useContext(AuthContext) if (context === undefined) { throw new Error("useAuthContext must be used within an AuthProvider") } return context }