const eventCallbacks: { [key: string]: any } = {}

export const registerEventCallback = (event: string | number, id: string | number, callback: any) => {
    if (!eventCallbacks[event]) eventCallbacks[event] = {}
    eventCallbacks[event][id] = callback
}

export const unregisterEventCallback = (event: string | number, id: string | number) => {
    delete eventCallbacks[event][id]
}
export const getEventCallbacks = (event: string) => {
    return eventCallbacks[event]
}
