import * as __internal_types from '../internal/types.cjs';
export { UTFiles } from '../internal/types.cjs';
import * as _uploadthing_shared from '@uploadthing/shared';
import { Json, UploadThingError } from '@uploadthing/shared';
import { ActionFunctionArgs } from '@remix-run/server-runtime';
import { FileRouter, RouteHandlerOptions } from '../types/index.js';
export { FileRouter } from '../types/index.js';

type CreateBuilderOptions<TErrorShape extends Json> = {
    errorFormatter: (err: UploadThingError) => TErrorShape;
};

type AdapterArgs = {
    req: undefined;
    res: undefined;
    event: ActionFunctionArgs;
};
declare const createUploadthing: <TErrorShape extends Json>(opts?: CreateBuilderOptions<TErrorShape>) => <TRouteOptions extends _uploadthing_shared.RouteOptions>(input: _uploadthing_shared.FileRouterInputConfig, config?: TRouteOptions | undefined) => __internal_types.UploadBuilder<{
    _routeOptions: TRouteOptions;
    _input: {
        in: __internal_types.UnsetMarker;
        out: __internal_types.UnsetMarker;
    };
    _metadata: __internal_types.UnsetMarker;
    _adapterFnArgs: AdapterArgs;
    _errorShape: TErrorShape;
    _errorFn: __internal_types.UnsetMarker;
    _output: __internal_types.UnsetMarker;
}>;
declare const createRouteHandler: <TRouter extends FileRouter>(opts: RouteHandlerOptions<TRouter>) => {
    action: (args_0: ActionFunctionArgs) => Promise<Response>;
    loader: (args_0: ActionFunctionArgs) => Promise<Response>;
};

export { createRouteHandler, createUploadthing };
