import * as vite from 'vite';

type RuntimeEnv = Record<string, string | boolean | number | undefined>;
type Prefix = {
    server: string;
    client: string;
};
type EnvOptions = {
    envFile?: string;
};

interface ViteT3EnvOptions<ClientEnv extends RuntimeEnv = RuntimeEnv, ServerEnv extends RuntimeEnv = RuntimeEnv> {
    clientEnv: (runtimeEnv: RuntimeEnv, clientPrefix?: string | undefined) => Readonly<ClientEnv>;
    serverEnv?: (runtimeEnv: RuntimeEnv) => Readonly<ServerEnv>;
    envOptions?: EnvOptions;
    prefix?: Partial<Prefix> | string;
}

declare const t3EnvPlugin: <ClientEnv extends RuntimeEnv = RuntimeEnv, ServerEnv extends RuntimeEnv = RuntimeEnv>(config: ViteT3EnvOptions<ClientEnv, ServerEnv>) => vite.Plugin<any>[];

export { type RuntimeEnv, t3EnvPlugin };
