'use client'; import * as React from 'react'; import { AlertCircle, FileQuestion, X } from 'lucide-react'; import { Modal } from '@/components/ui/Modal'; import { Button } from '@/components/ui/Button'; export interface UnsupportedFormatDialogProps { open: boolean; fileName: string; fileType: string; onClose: () => void; } const SUPPORTED_FORMATS = [ { extension: 'WAV', mimeType: 'audio/wav', description: 'Lossless, widely supported' }, { extension: 'MP3', mimeType: 'audio/mpeg', description: 'Compressed, universal support' }, { extension: 'OGG', mimeType: 'audio/ogg', description: 'Free, open format' }, { extension: 'FLAC', mimeType: 'audio/flac', description: 'Lossless compression' }, { extension: 'M4A/AAC', mimeType: 'audio/aac', description: 'Apple audio format' }, { extension: 'AIFF', mimeType: 'audio/aiff', description: 'Apple lossless format' }, { extension: 'WebM', mimeType: 'audio/webm', description: 'Modern web format' }, ]; export function UnsupportedFormatDialog({ open, fileName, fileType, onClose, }: UnsupportedFormatDialogProps) { if (!open) return null; return (
{/* Header */}

Unsupported File Format

{/* Error Message */}

Cannot open this file

{fileName} {fileType && ( ({fileType}) )}

{/* Supported Formats */}

Supported Audio Formats:

{SUPPORTED_FORMATS.map((format) => (
{format.extension} {format.description}
))}
{/* Recommendations */}

How to fix this:

  • Convert your audio file to a supported format (WAV or MP3 recommended)
  • Use a free audio converter like Audacity, FFmpeg, or online converters
  • Check that the file isn't corrupted or incomplete
{/* Close Button */}
); }