/**
 * @deprecated Use `useAuth` from '@/lib/auth' instead
 * This hook is kept for backward compatibility but now delegates to useAuth
 */
import { useAuth } from '@/lib/auth';

export function usePermissions() {
  const auth = useAuth();
  
  return {
    permissions: Array.from(auth.permissions),
    roles: auth.roles,
    isAdmin: auth.isAdmin,
    loading: auth.loading,
    hasPermission: auth.hasPermission,
    hasAnyPermission: auth.hasAnyPermission,
    hasAllPermissions: auth.hasAllPermissions,
    hasRole: auth.hasRole,
    hasAnyRole: auth.hasAnyRole,
    reload: auth.reload,
  };
}

