import { InlineConfig, PluginOption } from 'vite';

type DirRoute = {
    dir: string;
    route: string;
    exclude?: string[];
    skip?: "development" | "production" | string | boolean;
};
type ApiOpts = {
    moduleId?: string;
    mode?: "legacy" | "isolated";
    server?: string;
    handler?: string;
    configure?: string;
    openapi?: string;
    dirs?: DirRoute[];
    include?: string[];
    exclude?: string[];
    mapper?: {
        [k: string]: false | string | {
            method: string;
            priority: number;
        };
    };
    filePriority?: number;
    paramPriority?: number;
    routeBase?: string;
    root?: string;
    cacheDir?: string;
    forceRestart?: boolean;
    disableBuild?: boolean;
    clientOutDir?: string;
    clientMinify?: boolean | "terser" | "esbuild";
    clientBuild?: (config: InlineConfig) => InlineConfig;
    clientSkip?: boolean;
    serverOutDir?: string;
    serverMinify?: boolean | "terser" | "esbuild";
    serverBuild?: (config: InlineConfig) => InlineConfig;
    serverSkip?: boolean;
};

declare const pluginAPIRoutes: (opts?: ApiOpts) => PluginOption;
declare const pluginAPI: (opts?: ApiOpts) => PluginOption;
declare const createAPI: (opts?: ApiOpts) => PluginOption;

export { createAPI, pluginAPIRoutes as default, pluginAPI, pluginAPIRoutes };
