// Types
export * from './types'

// Permissions
export * from './permissions'

// Context and hooks
export { AuthProvider, useAuth, withAuth as withAuthComponent, AuthContext } from './AuthContext'
export { useAuth as useAuthHook, usePermission, useRole, useRequireAuth } from './useAuth'

// API middleware
export {
  withAuth,
  withRole,
  withPermission,
  withAnyPermission,
  withAllPermissions,
  withRateLimit,
  checkRateLimit,
} from './withAuth'
export type { AuthenticatedRequest } from './withAuth'

// Role-based middleware
export {
  requireRole,
  requireAdmin,
  requireFarmManager,
  requireGrower,
  requireUser,
} from './withRole'
