import type { ApiErrorCode, FieldError } from '../../../api/src/common/index';
import { type ApiClient } from '../../../api/src/request';
import type { UploadIntentContract } from '../../../api/src/index';
import type { VideoPrepIntent } from '../../../media-core/src/index';
import type { MediaAssetWithLabels } from '@riverbankcms/media-storage-supabase';
import type { Result } from '../../../core/src/index';
import type { UploadProgressHandler } from './useUploads';
import type { BrowserVideoPrepError, BrowserVideoPrepInput, BrowserVideoPrepResult } from '../videoPrepBrowser';
import { type ClassificationHook, type LoggerLike } from './internal/classification';
export type UploadIntentResolver = UploadIntentContract | ((file: File) => UploadIntentContract | undefined);
export type VideoPrepIntentResolver = VideoPrepIntent | ((file: File) => VideoPrepIntent | undefined);
export type BrowserVideoPreparer = (input: BrowserVideoPrepInput) => Promise<Result<BrowserVideoPrepResult, BrowserVideoPrepError>>;
export type BrowserVideoPrepLoader = () => Promise<{
    readonly prepareBrowserVideoUpload: BrowserVideoPreparer;
}>;
export declare class MediaUploaderError extends Error {
    readonly code?: ApiErrorCode;
    readonly status?: number;
    readonly fieldErrors?: readonly FieldError[];
    readonly cause?: unknown;
    constructor(message: string, options?: {
        readonly code?: ApiErrorCode;
        readonly status?: number;
        readonly fieldErrors?: readonly FieldError[];
        readonly cause?: unknown;
    });
}
export declare function getMediaUploaderErrorCode(error: Error | undefined): ApiErrorCode | undefined;
export type UseApiMediaUploaderOptions = {
    siteId: string;
    apiClient: ApiClient;
    autoClassify?: boolean;
    uploadIntent?: UploadIntentResolver;
    videoPrepIntent?: VideoPrepIntentResolver;
    loadVideoPrep?: BrowserVideoPrepLoader;
    onClassification?: ClassificationHook;
    logger?: LoggerLike;
};
export declare const useApiMediaUploader: ({ siteId, apiClient, autoClassify, uploadIntent, videoPrepIntent, loadVideoPrep, onClassification, logger: providedLogger, }: UseApiMediaUploaderOptions) => (file: File, onProgress?: UploadProgressHandler) => Promise<MediaAssetWithLabels>;
