import { io } from 'socket.io-client';
let chatSocket;
const initiateChatSocketConnection = (agentId, conversationId, organizationId) => {
    console.log("initiating socket connection for https://socketio.avakado.ai/chat", agentId, conversationId, organizationId);
    try {
        chatSocket = io("https://socketio.avakado.ai/chat", {
            transports: ['websocket'],
            query: {
                agentId: agentId,
                conversationId: conversationId,
                organizationId: organizationId
            },
            forceNew: true
        });
        console.log("Socket Object Chat", chatSocket);
    }
    catch (e) {
        console.log("Chat Socket Error ", e);
    }
};
//"https://chatapi.campusroot.com/admin"
//trigger-{action:'getActiveUsersByAgent',data:{agentId:}}
const getChatSocket = () => chatSocket;
export { initiateChatSocketConnection, getChatSocket };
//# sourceMappingURL=socket.js.map