{"version":3,"file":"TicketWidget_TCFP_lightbox.CEd7GSZ6.mjs","names":["useState","React.useMemo"],"sources":["https:/framerusercontent.com/modules/ZsFn8vKCy0BSZTEswKyf/o9uUQPxMMvnAsGPlPAdq/TicketWidget_TCFP_lightbox.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{useState,useEffect}from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType}from\"framer\";export default function TicketCMS(props){const{widgetId,buttonText,textColor}=props;const[isOpen,setIsOpen]=useState(false);const[mounted,setMounted]=useState(false);useEffect(()=>{setMounted(true);},[]);const targetUrl=React.useMemo(()=>{if(!widgetId)return\"\";if(widgetId.includes(\"http\"))return widgetId;return`https://tickets.thecollectivefuturesproject.com/events/module/tickets?id=${widgetId.trim()}`;},[widgetId]);const toggleLightbox=e=>{if(e)e.preventDefault();setIsOpen(!isOpen);};const fullScreenView=/*#__PURE__*/_jsx(\"div\",{style:fullScreenOverlayStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:fullScreenContentStyle,children:[/*#__PURE__*/_jsx(\"button\",{style:closeButtonStyle,onClick:toggleLightbox,children:\"✕\"}),/*#__PURE__*/_jsx(\"iframe\",{src:targetUrl,style:iframeStyle,frameBorder:\"0\",allow:\"payment\"})]})});return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsx(\"a\",{style:{...buttonStyle,color:textColor},href:targetUrl,onClick:toggleLightbox,children:buttonText}),isOpen&&mounted&&/*#__PURE__*/createPortal(fullScreenView,document.body)]});}// --- STYLES ---\nconst containerStyle={width:\"100%\",height:\"100%\",display:\"flex\"};const buttonStyle={width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",cursor:\"pointer\",textDecoration:\"none\",fontWeight:\"700\",fontFamily:\"sans-serif\",fontSize:\"16px\"};const fullScreenOverlayStyle={position:\"fixed\",top:0,left:0,right:0,bottom:0,// Use dvh (Dynamic Viewport Height) to account for mobile browser UI\nheight:\"100dvh\",width:\"100vw\",backgroundColor:\"white\",zIndex:999999,overflow:\"hidden\",display:\"flex\"};const fullScreenContentStyle={position:\"relative\",width:\"100%\",height:\"100%\",backgroundColor:\"white\",display:\"flex\"};const iframeStyle={width:\"100%\",height:\"100%\",border:\"none\",// Ensures the iframe content doesn't try to expand beyond the container\ndisplay:\"block\"};const closeButtonStyle={position:\"absolute\",top:\"15px\",right:\"15px\",width:\"40px\",height:\"40px\",borderRadius:\"50%\",backgroundColor:\"#000\",color:\"#fff\",border:\"none\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"20px\",zIndex:1e3,boxShadow:\"0 4px 12px rgba(0,0,0,0.2)\"};// PROPERTY CONTROLS\nTicketCMS.defaultProps={widgetId:\"1047\",buttonText:\"BUY TICKETS\",textColor:\"#000000\"};addPropertyControls(TicketCMS,{widgetId:{type:ControlType.String,title:\"Widget ID\"},buttonText:{type:ControlType.String,title:\"Button Text\"},textColor:{type:ControlType.Color,title:\"Text Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TicketCMS\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TicketWidget_TCFP_lightbox.map"],"mappings":"6MAAmN,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,WAAS,aAAW,aAAW,EAAW,CAAC,EAAO,GAAWA,EAAS,GAAM,CAAM,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAC,MAAc,CAAC,EAAW,GAAK,EAAG,EAAE,CAAC,CAAC,IAAM,EAAUC,MAAuB,EAAqB,EAAS,SAAS,OAAO,CAAQ,EAAe,4EAA4E,EAAS,MAAM,GAAjJ,GAAsJ,CAAC,EAAS,CAAC,CAAO,EAAe,GAAG,CAAI,GAAE,EAAE,gBAAgB,CAAC,EAAU,CAA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