import { useContext } from 'react';
import { AuthContext } from './AuthProvider';
import { AuthContextValue } from './types';
/**
* Hook to access authentication context
* Must be used within an AuthProvider
*
* @example
* ```tsx
* function MyComponent() {
* const { user, isAuthenticated, login, logout } = useAuth();
*
* if (!isAuthenticated) {
* return
Welcome, {user.username}!
* *