/**
 * Returns true when the (mime, fileName, url) triple looks like an
 * audio payload — either by mime, by recognised extension on the
 * filename or URL path, or by a voice-message naming hint. The hint
 * branch is what catches voicemails sent as `application/octet-stream`
 * with a generic `.bin` filename (customer-reported #9 voicemail).
 */
export declare function isLikelyAudio(mime: string | undefined | null, fileName?: string | null, url?: string | null): boolean;
/**
 * Returns the conventional extension (including the leading dot) for a
 * MIME type, or `.bin` as a last-resort fallback so callers never end up
 * with an extension-less filename.
 */
export declare function getExtensionForMime(mime: string | undefined | null): string;
/**
 * Parses a URL or file path and returns the last segment, URL-decoded,
 * stripped of query/hash. Returns `''` when nothing usable is present.
 */
export declare function filenameFromUrl(url: string | undefined | null): string;
/**
 * Ensures `fileName` ends with a valid extension. Strategy:
 *   1. If the input already has an extension, return it unchanged.
 *   2. Otherwise, derive the extension from `mime` and append it.
 *   3. If `mime` is unknown, append `.bin`.
 *
 * Empty/falsy filenames get a `media_<timestamp>` base before the
 * extension is appended so callers always get a usable filename.
 */
export declare function ensureFilenameHasExtension(fileName: string | undefined | null, mime: string | undefined | null): string;
/**
 * Best-effort filename derivation for a message bubble:
 *   - server-provided `fileName`
 *   - server-provided `originalName`
 *   - URL pathname
 *   - generic `media_<timestamp>` so we never render an empty label
 *
 * Always returns a string with a valid extension.
 */
export declare function deriveDisplayFilename(opts: {
    fileName?: string | null;
    originalName?: string | null;
    url?: string | null;
    mime?: string | null;
}): string;
//# sourceMappingURL=mimeToExtension.d.ts.map