#pragma once #include #include #include #include #include #include #include #include using namespace facebook; namespace reanimated { class WorkletEventHandler; class EventHandlerRegistry { std::map< std::string, std::unordered_map>> eventMappings; std::map> eventHandlers; std::mutex instanceMutex; public: void registerEventHandler(std::shared_ptr eventHandler); void unregisterEventHandler(unsigned long id); void processEvent( jsi::Runtime &rt, std::string eventName, std::string eventPayload); bool isAnyHandlerWaitingForEvent(std::string eventName); }; } // namespace reanimated