import type { TranscriptSegment } from "./link-preview/types.js";
import { parseTimestampStringToMs } from "./transcript/timestamps.js";
export { parseTimestampStringToMs };
export type YoutubeCaptionTrackInput = {
    baseUrl?: unknown;
    url?: unknown;
    languageCode?: unknown;
    kind?: unknown;
    label?: unknown;
    name?: {
        simpleText?: unknown;
        runs?: Array<{
            text?: unknown;
        }>;
    } | unknown;
};
export type YoutubeCaptionTrack = {
    baseUrl: string;
    languageCode: string;
    kind: string;
    label: string;
    automatic: boolean;
};
export type YoutubeCaptionLine = {
    startMs: number | null;
    endMs: number | null;
    text: string;
};
export type YoutubeCaptionTranscript = {
    text: string;
    lines: YoutubeCaptionLine[];
    segments: TranscriptSegment[] | null;
};
type TrackPriority = "english-first" | "manual-first";
export declare function rankYoutubeCaptionTracks({ captionTracks, automaticCaptionTracks, skipAutoGenerated, priority, }: {
    captionTracks: readonly unknown[];
    automaticCaptionTracks?: readonly unknown[];
    skipAutoGenerated?: boolean;
    priority?: TrackPriority;
}): YoutubeCaptionTrack[];
export declare function buildYoutubeCaptionTrackUrls(baseUrl: string): string[];
export declare function normalizeYoutubeCaptionText(text: string): string;
export declare function parseYoutubeCaptionPayload(raw: string): YoutubeCaptionTranscript | null;
export declare function resolveYoutubeCaptionTrack(baseUrl: string, loadText: (url: string) => Promise<string | null>): Promise<YoutubeCaptionTranscript | null>;
export declare function formatYoutubeCaptionLines(lines: readonly YoutubeCaptionLine[]): string;
