{
  "version": 3,
  "sources": ["../../src/methods/initApp/websocket/registerWebsocket.ts"],
  "sourcesContent": ["import { initializeWebsocketConnection } from './initializeWebsocketConnection';\n\n/**\n * Manages the WebSocket connection lifecycle.\n *\n * Holds a reference to the current WebSocket connection's `closeConnection` method,\n * allowing other parts of the application to close the connection on demand (e.g., on logout).\n *\n * This pattern avoids exporting mutable bindings directly by encapsulating\n * the reference within a stable object.\n *\n * @example\n * ```ts\n * await registerWebsocketListener(address);\n * websocketManager.closeConnectionRef?.();\n * ```\n */\nexport const websocketManager = {\n  closeConnectionRef: undefined as (() => void) | undefined\n};\n\nexport async function registerWebsocketListener(address: string) {\n  const { closeConnection } = await initializeWebsocketConnection(address);\n\n  websocketManager.closeConnectionRef = closeConnection;\n}\n"],
  "mappings": "yCAiBO,IAAMA,EAAmB,CAC9B,mBAAoB,MACtB,EAEA,eAAsBC,EAA0BC,EAAiB,CAC/D,GAAM,CAAE,gBAAAC,CAAgB,EAAI,MAAMC,EAA8BF,CAAO,EAEvEF,EAAiB,mBAAqBG,CACxC",
  "names": ["websocketManager", "registerWebsocketListener", "address", "closeConnection", "initializeWebsocketConnection"]
}
