// Module ID: 1784 // Function ID: 1785 // Dependencies: [19, 1742] // Exports: useEvent // Module 1784 import _mod19 from "module_19" /* 19 */; import WorkletEventHandlerNative from "WorkletEventHandlerNative" /* 1742 */; const useRef = _mod19.useRef; export const useEvent = function useEvent(fn, items, doDependenciesDiffer) { if (items === undefined) { items = []; } let flag = doDependenciesDiffer; if (doDependenciesDiffer === undefined) { flag = false; } const tmp = useRef(null); if (null === tmp.current) { const workletEventHandler1 = new WorkletEventHandlerNative.WorkletEventHandler(fn, items); const obj2 = { workletEventHandler: workletEventHandler1 }; tmp.current = obj2; } else if (flag) { tmp.current.workletEventHandler.updateEventHandler(fn, items); const obj = { workletEventHandler: tmp.current.workletEventHandler }; tmp.current = obj; } return tmp.current; };