import type { TranscriptionConfig } from "../../transcription-config.js";
import type { ProviderContext, ProviderFetchOptions, ProviderResult, TranscriptSource } from "../../types.js";
type DurationMetadata = {
    durationSeconds?: number;
    sourceMetrics?: {
        platform: "youtube";
        videoId: string;
        viewCount: number | null;
        observedAt: string;
    };
};
export type YouTubeProviderFlow = {
    context: ProviderContext;
    options: ProviderFetchOptions;
    transcription: TranscriptionConfig;
    htmlText: string;
    attemptedProviders: TranscriptSource[];
    notes: string[];
    effectiveVideoId: string | null;
    durationMetadata: DurationMetadata;
    canTranscribe: boolean;
    canRunYtDlp: boolean;
    pushHint: (hint: string) => void;
};
export declare function loadYoutubeHtml(context: ProviderContext, options: ProviderFetchOptions): Promise<string | null>;
export declare function resolveEffectiveVideoId(context: ProviderContext): string | null;
export declare function resolveDurationMetadata(args: {
    htmlText: string;
    effectiveVideoId: string | null;
    url: string;
    options: ProviderFetchOptions;
}): Promise<DurationMetadata>;
export declare function tryApifyTranscript(flow: YouTubeProviderFlow, hint: string): Promise<ProviderResult | null>;
export declare function tryManualCaptionTranscript(flow: YouTubeProviderFlow): Promise<ProviderResult | null>;
export declare function tryWebTranscript(flow: YouTubeProviderFlow): Promise<ProviderResult | null>;
export declare function tryYtDlpTranscript(args: {
    flow: YouTubeProviderFlow;
    mode: ProviderFetchOptions["youtubeTranscriptMode"];
}): Promise<ProviderResult | null>;
export declare function buildUnavailableResult(flow: YouTubeProviderFlow): ProviderResult;
export {};
