import type { ApiErrorCode, FieldError } from '@riverbankcms/api/common';
import { type ApiClient } from '@riverbankcms/api/request';
import type { UploadIntentContract } from '@riverbankcms/api';
import type { VideoPrepIntent } from '@riverbankcms/media-core';
import type { MediaAssetWithLabels } from '@riverbankcms/media-storage-supabase';
import type { UploadProgressHandler } from './useUploads';
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 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;
    onClassification?: ClassificationHook;
    logger?: LoggerLike;
};
export declare const useApiMediaUploader: ({ siteId, apiClient, autoClassify, uploadIntent, videoPrepIntent, onClassification, logger: providedLogger, }: UseApiMediaUploaderOptions) => (file: File, onProgress?: UploadProgressHandler) => Promise<MediaAssetWithLabels>;
