import { createContext } from "react";
import type { WsWebSendTopicPayload, WsWebSendTopics } from "../utils/common";

interface MessageSender {
  messageSender?: <T extends WsWebSendTopics>(topic: T, data: WsWebSendTopicPayload[T]) => void;
};

export const WebScoketContext = createContext<MessageSender>({});