{"version":3,"file":"BookingListener.DlC6lFjo.mjs","names":[],"sources":["https:/framerusercontent.com/modules/jD3IkrtoMOfCekyGa2el/9Idgvy1wB899M4iYOHb6/BookingListener.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function withBookingListener(Component){return props=>{useEffect(()=>{console.log(\"✅ BookingListener mounted\")// <-- add this\n;const handler=event=>{console.log(\"📨 Message received:\",event.data)// <-- and this\n;const data=event.data;if(!data)return;if(data.event===\"central.event_scheduled\"){const booking=data.payload;if(!booking)return;console.log(\"Booked:\",booking.booking_id,booking.invitee_email,booking);const ph=window.posthog;if(ph){ph.capture(\"demo_booked\",{booking_id:booking.booking_id,invitee_email:booking.invitee_email,invitee_name:booking.invitee_name,event_type:booking.event_type,scheduled_at:booking.scheduled_at});}return;}if(data.event===\"central.booking_redirect\"){console.log(\"Redirecting:\",data.payload?.url);return;}if(data.type===\"booking-success\"){console.log(\"Success UI shown (no redirect path)\");}};window.addEventListener(\"message\",handler);return()=>window.removeEventListener(\"message\",handler);},[]);return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withBookingListener\":{\"type\":\"reactHoc\",\"name\":\"withBookingListener\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BookingListener.map"],"mappings":"gIAAwE,SAAgB,EAAoB,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAC,QAAQ,IAAI,2BAA2B,EAC3L,IAAM,EAAQ,GAAO,CAAC,QAAQ,IAAI,uBAAuB,EAAM,IAAI,EACnE,IAAM,EAAK,EAAM,KAAS,KAAY,IAAG,EAAK,QAAQ,0BAA0B,CAAC,IAAM,EAAQ,EAAK,QAAQ,GAAG,CAAC,EAAQ,OAAO,QAAQ,IAAI,UAAU,EAAQ,WAAW,EAAQ,cAAc,CAAO,EAAE,IAAM,EAAG,EAAO,QAAW,GAAI,EAAG,QAAQ,cAAc,CAAC,WAAW,EAAQ,WAAW,cAAc,EAAQ,cAAc,aAAa,EAAQ,aAAa,WAAW,EAAQ,WAAW,aAAa,EAAQ,YAAY,CAAC,EAAG,MAAO,CAAC,GAAG,EAAK,QAAQ,2BAA2B,CAAC,QAAQ,IAAI,eAAe,EAAK,SAAS,GAAG,EAAE,MAAO,CAAI,EAAK,OAAO,mBAAmB,QAAQ,IAAI,qCAAqC,CAAtL,CAAyL,EAA6C,OAA3C,EAAO,iBAAiB,UAAU,CAAO,MAAY,EAAO,oBAAoB,UAAU,CAAO,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,EAAI,qBAF1tB,IAA6B"}