// Server-side Audio Compression - DISABLED
// Compression is now handled client-side using Web Audio API + lamejs
// This file provides stub functions for backward compatibility

export interface CompressionOptions {
  targetSizeMB?: number
  maxSizeMB?: number
  minBitrate?: number
  maxBitrate?: number
}

export interface CompressionResult {
  buffer: ArrayBuffer
  originalSize: number
  compressedSize: number
  bitrate: number
  compressionRatio: number
  wasCompressed: boolean
}

// Server-side compression is disabled - return original file
export async function compressAudio(file: File | Blob, _options: CompressionOptions = {}): Promise<CompressionResult> {
  console.log("[Audio Compression] Server-side compression disabled, using client-side instead")
  const buffer = await file.arrayBuffer()
  return {
    buffer,
    originalSize: file.size,
    compressedSize: file.size,
    bitrate: 0,
    compressionRatio: 1,
    wasCompressed: false,
  }
}

export async function isCompressionEnabled(): Promise<boolean> {
  return false // Server-side compression is disabled
}

export async function getCompressionSettings(): Promise<CompressionOptions> {
  return { targetSizeMB: 2, maxSizeMB: 3, minBitrate: 64, maxBitrate: 192 }
}
