import { AppKitError } from "./base.js";

//#region src/errors/tunnel.d.ts

/**
 * Error thrown when remote tunnel operations fail.
 * Use for tunnel connection issues, message parsing failures, etc.
 *
 * @example
 * ```typescript
 * throw new TunnelError("No tunnel connection available");
 * throw new TunnelError("Failed to parse WebSocket message", { cause: parseError });
 * ```
 */
declare class TunnelError extends AppKitError {
  readonly code = "TUNNEL_ERROR";
  readonly statusCode = 502;
  readonly isRetryable = true;
  /**
   * Create a tunnel error for missing tunnel getter
   */
  static getterNotRegistered(): TunnelError;
  /**
   * Create a tunnel error for no available connection
   */
  static noConnection(): TunnelError;
  /**
   * Create a tunnel error for asset fetch failure
   */
  static fetchFailed(path: string, cause?: Error): TunnelError;
  /**
   * Create a tunnel error for message parsing failure
   */
  static parseError(messageType: string, cause?: Error): TunnelError;
}
//#endregion
export { TunnelError };
//# sourceMappingURL=tunnel.d.ts.map