import type { CleanedEnv, ZenvSpec } from "./types.js"; declare global { interface Window { __ZENV_CLIENT__?: Record; } } /** * Generates JavaScript code to inject client-safe environment variables into the browser. * This should be called on the server during SSR and the result included in a script tag. * * @param env The parsed environment object returned from zenv() * @param clientSafePrefixes Optional array of prefixes that indicate client-safe variables. * If not provided, uses the prefixes configured in zenv options. * @returns JavaScript code as a string, or empty string if on client * * @example * ```ts * // Using auto-detected prefixes from zenv configuration * const script = getClientEnvScript(env); * * // Or with explicit prefixes (overrides configured prefixes) * const script = getClientEnvScript(env, ["PUBLIC_", "CUSTOM_"]); * // Returns: 'window.__ZENV_CLIENT__ = {"PUBLIC_API_URL": "...", ...};' * ``` */ export declare function getClientEnvScript(env: CleanedEnv, clientSafePrefixes?: string[]): string;