{"version":3,"file":"EventbriteEmbed.D5wsYOfP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Wh8RQnaffFWejslumhJv/fSzPlg57hQxV0PSOPXKh/EventbriteEmbed.js"],"sourcesContent":["// Eventbrite widget iframe component\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function EventbriteEmbed(props){const{eventId,widgetHeight}=props;const containerRef=useRef(null);const widgetIdRef=useRef(\"\");useEffect(()=>{if(typeof window===\"undefined\"||!eventId)return;// Generate unique container ID\nconst containerId=`eventbrite-widget-container-${eventId}-${Date.now()}`;widgetIdRef.current=containerId;if(containerRef.current){containerRef.current.id=containerId;}// Load Eventbrite widgets script\nconst script=document.createElement(\"script\");script.src=\"https://www.eventbrite.com/static/widgets/eb_widgets.js\";script.onload=()=>{// Create widget after script loads\nif(window.EBWidgets){window.EBWidgets.createWidget({widgetType:\"checkout\",eventId:eventId,iframeContainerId:containerId,iframeContainerHeight:widgetHeight,onOrderComplete:function(){console.log(\"Order complete!\");}});}};document.head.appendChild(script);return()=>{// Cleanup script on unmount\nif(script.parentNode){script.parentNode.removeChild(script);}};},[eventId,widgetHeight]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",minHeight:`${widgetHeight}px`,position:\"relative\",overflow:\"hidden\"}});}addPropertyControls(EventbriteEmbed,{eventId:{type:ControlType.String,title:\"Event ID\",defaultValue:\"1411198896889\",placeholder:\"Enter Eventbrite event ID\"},widgetHeight:{type:ControlType.Number,title:\"Widget Height\",defaultValue:425,min:300,max:800,step:25,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EventbriteEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EventbriteEmbed.map"],"mappings":"kTAIG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,UAAQ,eAAa,CAAC,EAAY,EAAa,EAAO,KAAK,CAAO,EAAY,EAAO,GAAG,CAIvD,MAJwD,GAAU,IAAI,CAAC,GAAU,aAAuB,EAAQ,OACzM,IAAM,GAAa,8BAA8B,EAAQ,GAAG,KAAK,KAAK,GAAmC,AAAhC,EAAY,QAAQ,EAAe,EAAa,UAAS,EAAa,QAAQ,GAAG,GAC1J,IAAM,EAAO,SAAS,cAAc,SAAS,CACiN,OADhN,EAAO,IAAI,0DAA0D,EAAO,OAAO,IAAI,CACrI,AAAG,EAAO,WAAW,EAAO,UAAU,aAAa,CAAC,WAAW,WAAmB,UAAQ,kBAAkB,EAAY,sBAAsB,EAAa,gBAAgB,UAAU,CAAC,QAAQ,IAAI,kBAAkB,AAAE,CAAC,EAAC,AAAG,EAAC,SAAS,KAAK,YAAY,EAAO,CAAO,IAAI,CACxQ,AAAG,EAAO,YAAY,EAAO,WAAW,YAAY,EAAO,AAAG,CAAE,EAAC,CAAC,EAAQ,CAAa,EAAC,CAAqB,EAAK,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,aAAa,EAAa,IAAI,SAAS,WAAW,SAAS,QAAS,CAAC,EAAC,AAAE,cAAA,IAPpP,GAA2C,IAAoC,IAAoD,CAOiH,EAAoB,EAAgB,CAAC,QAAQ,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,aAAa,gBAAgB,YAAY,2BAA4B,EAAC,aAAa,CAAC,KAAK,EAAY,OAAO,MAAM,gBAAgB,aAAa,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,GAAG,KAAK,IAAK,CAAC,EAAC"}