/**
 * Moderation Library
 * 
 * Centralized exports for all moderation-related utilities.
 * Provides business logic for moderation workflows, queries, and entity resolution.
 */

// Query builders and data fetching
export {
  buildSubmissionQuery,
  buildCountQuery,
  fetchSubmissions,
  isLockedByOther,
  getQueueStats,
} from './queries';

export type { QueryConfig, FetchSubmissionsResult } from './queries';

// Entity resolution
export {
  resolveEntityName,
  getEntityDisplayName,
  extractEntityIds,
  getSubmissionTypeLabel,
} from './entities';

export type { ResolvedEntityNames } from './entities';

// Moderation actions
export {
  approvePhotoSubmission,
  approveSubmissionItems,
  rejectSubmissionItems,
  performModerationAction,
  deleteSubmission,
} from './actions';

export type {
  ModerationActionResult,
  ModerationConfig,
  DeleteSubmissionConfig,
} from './actions';

// Removed - sorting functionality deleted

// Realtime subscription utilities
export {
  matchesEntityFilter,
  matchesStatusFilter,
  hasItemChanged,
  extractChangedFields,
  buildModerationItem,
} from './realtime';

// Lock management utilities
export {
  canClaimSubmission,
  isActiveLock,
  getLockStatus,
  formatLockExpiry,
  getLockUrgency,
} from './lockHelpers';

export type { LockStatus, LockUrgency } from './lockHelpers';

// Constants
export { MODERATION_CONSTANTS } from './constants';
export type { ModerationConstants } from './constants';
