{"version":3,"file":"js/component-eventbuswrapper.chunk.js","mappings":"kJAoBA,UAlByBA,KACrB,IAAAC,YAAU,KACN,MAAMC,EAAyBC,IAC3BC,QAAQC,IAAIF,GACZ,SAAoB,kBAAmBA,EAAEG,OAAO,EAE9CC,EAAwBJ,IAC1B,SAAoB,iBAAkBA,EAAEG,OAAO,EAInD,OAFAE,SAASC,iBAAiB,kBAAmBP,GAC7CM,SAASC,iBAAiB,iBAAkBF,GACrC,KACHC,SAASE,oBAAoB,kBAAmBR,GAAuB,GACvEM,SAASE,oBAAoB,iBAAkBH,GAAsB,EAAM,CAC9E,GACF,IACI,gBAAoB,WAAgB,M","sources":["webpack:///./assets/common/src/utils/EventBusWrapper.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport customEventBus from '@common/scripts/libs/eventBus';\nconst EventBusWrapper = (events) => {\n    useEffect(() => {\n        const triggerWishlistUpdate = (e) => {\n            console.log(e);\n            customEventBus.emit('wishlist:update', e.detail);\n        };\n        const triggerAccountUpdate = (e) => {\n            customEventBus.emit('account:update', e.detail);\n        };\n        document.addEventListener('wishlist:update', triggerWishlistUpdate);\n        document.addEventListener('account:update', triggerAccountUpdate);\n        return () => {\n            document.removeEventListener('wishlist:update', triggerWishlistUpdate, false);\n            document.removeEventListener('account:update', triggerAccountUpdate, false);\n        };\n    }, []);\n    return React.createElement(React.Fragment, null);\n};\nexport default EventBusWrapper;\n"],"names":["events","useEffect","triggerWishlistUpdate","e","console","log","detail","triggerAccountUpdate","document","addEventListener","removeEventListener"],"sourceRoot":""}