import { createContext, useContext } from 'react';

import { AuthSessionState } from '@/business/auth/types';

export const AuthContext = createContext<AuthSessionState>({
  user: null,
  profile: null,
  loading: true,
  signIn: async () => ({ error: null }),
  signUp: async () => ({ error: 'Sign up is not available yet' }),
  signOut: async () => ({ error: null }),
  updateProfile: async () => ({ error: 'Profile updates are not available yet' }),
  isAuthenticated: false,
});

export const useAuth = () => useContext(AuthContext);
