'use client';

// Session (reactive snapshot from the generated auth store)
export { useSession, type SessionSnapshot, type SessionStatus } from './useSession';

// Router hooks
export { useCfgRouter } from './useCfgRouter';
export { useQueryParams } from './useQueryParams';

// Core form hooks (decomposed)
export { useAuthFormState, type UseAuthFormStateReturn } from './useAuthFormState';
export { useAuthValidation, validateIdentifier } from './useAuthValidation';

// Complete form hook (composes the above)
export { useAuthForm, type AuthFormReturn, type UseAuthFormOptions } from './useAuthForm';

// Auto-auth from URL
export { useAutoAuth, type UseAutoAuthOptions } from './useAutoAuth';

// OAuth
export { useGithubAuth, type UseGithubAuthOptions, type UseGithubAuthReturn } from './useGithubAuth';

// 2FA — one consolidated hook (verify / setup / status namespaces),
// plus the underlying sub-hooks for single-concern consumers.
export {
  useTwoFactor,
  useTwoFactorVerify,
  useTwoFactorSetup,
  useTwoFactorStatus,
  type UseTwoFactorOptions,
  type UseTwoFactorReturn,
  type UseTwoFactorVerifyOptions,
  type UseTwoFactorVerifyReturn,
  type UseTwoFactorSetupOptions,
  type UseTwoFactorSetupReturn,
  type UseTwoFactorStatusReturn,
  type TwoFactorSetupData,
  type TwoFactorDevice,
} from './useTwoFactor';

// Auth guards and redirects
export {
  consumeSavedRedirect,
  peekSavedRedirect,
  useAuthRedirectManager,
} from './useAuthRedirect';

// Storage hooks
export { useSessionStorage } from './useSessionStorage';
export { useLocalStorage } from './useLocalStorage';
export { useBase64, encodeBase64, decodeBase64 } from './useBase64';

// Profile cache
export {
  getCachedProfile,
  setCachedProfile,
  clearProfileCache,
  hasValidCache,
  getCacheMetadata,
  type ProfileCacheOptions,
} from './useProfileCache';

// Account deletion
export {
  useDeleteAccount,
  type UseDeleteAccountReturn,
  type DeleteAccountResult,
} from './useDeleteAccount';
