{"version":3,"file":"EventbriteEmbed.DaGCFTF2.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/Wh8RQnaffFWejslumhJv/d8h4a84FmOV1BbGcprGN/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\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EventbriteEmbed.map"],"mappings":"+LAIG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,UAAQ,gBAAc,EAAY,EAAaA,EAAO,KAAK,CAAO,EAAYA,EAAO,GAAG,CAIvD,OAJwD,MAAc,CAAC,GAAU,IAAS,QAAa,CAAC,EAAQ,OACzM,IAAM,EAAY,+BAA+B,EAAQ,GAAG,KAAK,KAAK,GAAG,EAAY,QAAQ,EAAe,EAAa,UAAS,EAAa,QAAQ,GAAG,GAC1J,IAAM,EAAO,SAAS,cAAc,SAAS,CACiN,MADhN,GAAO,IAAI,0DAA0D,EAAO,WAAW,CAClI,EAAO,WAAW,EAAO,UAAU,aAAa,CAAC,WAAW,WAAmB,UAAQ,kBAAkB,EAAY,sBAAsB,EAAa,gBAAgB,UAAU,CAAC,QAAQ,IAAI,kBAAkB,EAAG,CAAC,EAAI,SAAS,KAAK,YAAY,EAAO,KAAW,CACrQ,EAAO,YAAY,EAAO,WAAW,YAAY,EAAO,GAAM,CAAC,EAAQ,EAAa,CAAC,CAAqB,EAAK,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,GAAG,EAAa,IAAI,SAAS,WAAW,SAAS,SAAS,CAAC,CAAC,sBAPvM,IAAoC,IAAoD,CAOiH,EAAoB,EAAgB,CAAC,QAAQ,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,aAAa,gBAAgB,YAAY,4BAA4B,CAAC,aAAa,CAAC,KAAK,EAAY,OAAO,MAAM,gBAAgB,aAAa,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,GAAG,KAAK,KAAK,CAAC,CAAC"}