{
  "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": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,EAAA,qBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAA8C,2CAiBvC,MAAMF,EAAmB,CAC9B,mBAAoB,MACtB,EAEA,eAAsBD,EAA0BI,EAAiB,CAC/D,KAAM,CAAE,gBAAAC,CAAgB,EAAI,QAAM,iCAA8BD,CAAO,EAEvEH,EAAiB,mBAAqBI,CACxC",
  "names": ["registerWebsocket_exports", "__export", "registerWebsocketListener", "websocketManager", "__toCommonJS", "import_initializeWebsocketConnection", "address", "closeConnection"]
}
