import { generateVariables } from './chunk-2EVVSKOX.js';
import { getFileHeader } from './chunk-EYM3ANAG.js';
import { __name } from './chunk-6AXVLTU5.js';

// src/prepare/types/dts/node.ts
function generateNodeDeclarations(env, _context) {
  return `${getFileHeader(`
/// <reference types="@storm-stack/types" />
/// <reference types="@storm-stack/types/node" />
`)}
declare global {
  const $storm: StormContext<${generateVariables(env)}>;
}

export {};
 `;
}
__name(generateNodeDeclarations, "generateNodeDeclarations");
function generateNodeGlobal(path, _context) {
  return `${getFileHeader(`
/// <reference types="@storm-stack/types" />
/// <reference types="@storm-stack/types/node" />
`)}
declare global {
  const _StormEvent: (typeof import("${path}/event"))["StormEvent"];

  class StormEvent<TEventType extends string = string, TEventData = any>
   extends _StormEvent<TEventType, TEventData> {
    /**
    * Creates a new event.
    *
    * @param type - The event type.
    * @param data - The event data.
    */
    public constructor(
      type: TEventType,
      data: TEventData
    ) {
      super(type, data);
    }
  }

  const getBuildInfo: (typeof import("${path}/context"))["getBuildInfo"];
  const getRuntimeInfo: (typeof import("${path}/context"))["getRuntimeInfo"];
  const getEnvPaths: (typeof import("${path}/context"))["getEnvPaths"];
  const useStorm: (typeof import("${path}/context"))["useStorm"];
  const STORM_ASYNC_CONTEXT: (typeof import("${path}/context"))["STORM_ASYNC_CONTEXT"];
}

export {};

`;
}
__name(generateNodeGlobal, "generateNodeGlobal");
function generateNodeModules(path, _context) {
  return `${getFileHeader(`
/// <reference types="@storm-stack/types" />
/// <reference types="@storm-stack/types/node" />
`)}

declare module "storm:app" {
  const builder: (typeof import("${path}/app"))["builder"];

  export { builder };
}

declare module "storm:context" {
  const getBuildInfo: (typeof import("${path}/context"))["getBuildInfo"];
  const getRuntimeInfo: (typeof import("${path}/context"))["getRuntimeInfo"];
  const getEnvPaths: (typeof import("${path}/context"))["getEnvPaths"];
  const useStorm: (typeof import("${path}/context"))["useStorm"];
  const STORM_ASYNC_CONTEXT: (typeof import("${path}/context"))["STORM_ASYNC_CONTEXT"];

  export {
    getBuildInfo,
    getRuntimeInfo,
    getEnvPaths,
    useStorm,
    STORM_ASYNC_CONTEXT
  };
}

declare module "storm:event" {
  const _StormEvent: (typeof import("${path}/event"))["StormEvent"];

  class StormEvent<TEventType extends string = string, TEventData = any>
   extends _StormEvent<TEventType, TEventData> {
    /**
    * Creates a new event.
    *
    * @param type - The event type.
    * @param data - The event data.
    */
    public constructor(
      type: TEventType,
      data: TEventData
    ) {
      super(type, data);
    }
  }

  export { StormEvent };
}

`;
}
__name(generateNodeModules, "generateNodeModules");

export { generateNodeDeclarations, generateNodeGlobal, generateNodeModules };
//# sourceMappingURL=chunk-Q2XB6XLY.js.map
//# sourceMappingURL=chunk-Q2XB6XLY.js.map