{"version":3,"file":"Schedule_a_Class.B6w_DqlM.mjs","names":["useRef","useId"],"sources":["https:/framerusercontent.com/modules/wdkDIkaMs7iYA52uzZ6N/FLy31C6GVMvZeL3lvpaF/Schedule_a_Class.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useId,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * AXLE Squad Placement widget for Framer.\n *\n * Injects the loader AFTER its own container div exists and points data-container\n * at that exact div. Don't also add the <script> in Project Settings → End of\n * <body>; it's loaded here.\n *\n * AXLE sets display:flex on each .axle-sp-location-list, so the grid is forced\n * inline with !important via JS and re-applied by a MutationObserver (covers\n * first render, re-renders, and AXLE re-writing the style). Columns/breakpoint\n * are exposed as property controls.\n *\n * Remaining failure mode (same as the others): if the loader reads its config\n * strictly via document.currentScript, this won't render and Manufactur needs to\n * expose window.AxleWidgets.mount(el, {...}) / unmount(el).\n */function ensureMobileStyles(){if(document.getElementById(\"axle-widget-mobile-styles\"))return;const style=document.createElement(\"style\");style.id=\"axle-widget-mobile-styles\";style.textContent=`\n        .axle-widget-container { width: 100%; }\n        @media (max-width: 768px) {\n            .axle-widget-container {\n                max-width: 100%;\n                overflow-x: auto;\n                -webkit-overflow-scrolling: touch;\n            }\n        }\n    `;document.head.appendChild(style);}export default function SquadPlacementWidget({scriptSrc=\"https://widgets.axl3.io/custom/athletic-clubs/squad-placement-widget.js\",widgetId=\"3f8c2a7e-91b4-4d6f-8a2e-5c1b9d4e7f02\",sessionName=\"Squad Placement Call\",minHeight=400,desktopColumns=3,mobileColumns=2,gridBreakpoint=768}){const ref=useRef(null);const containerId=\"squad-placement-\"+useId().replace(/[:]/g,\"\");useEffect(()=>{if(RenderTarget.current()===RenderTarget.canvas)return;const el=ref.current;if(!el)return;ensureMobileStyles();const script=document.createElement(\"script\");script.src=scriptSrc;script.async=true;script.setAttribute(\"data-container\",containerId);script.setAttribute(\"data-widget-id\",widgetId);script.setAttribute(\"data-session-name\",sessionName);document.body.appendChild(script);return()=>{script.remove();const api=window.AxleWidgets;if(api&&typeof api.unmount===\"function\")api.unmount(el);el.innerHTML=\"\";};},[scriptSrc,widgetId,sessionName,containerId]);// Force grid onto each .axle-sp-location-list, overriding AXLE's flex.\nuseEffect(()=>{if(RenderTarget.current()===RenderTarget.canvas)return;const el=ref.current;if(!el)return;const mq=window.matchMedia(`(max-width: ${gridBreakpoint}px)`);const applyGrid=()=>{const cols=mq.matches?mobileColumns:desktopColumns;const want=`repeat(${cols}, 1fr)`;el.querySelectorAll(\".axle-sp-location-list\").forEach(list=>{// Skip if already correct — prevents the observer looping.\nif(list.style.display===\"grid\"&&list.style.gridTemplateColumns===want)return;list.style.setProperty(\"display\",\"grid\",\"important\");list.style.setProperty(\"grid-template-columns\",want,\"important\");});};const observer=new MutationObserver(applyGrid);observer.observe(el,{childList:true,subtree:true,attributes:true,attributeFilter:[\"style\",\"class\"]});mq.addEventListener(\"change\",applyGrid);applyGrid();return()=>{observer.disconnect();mq.removeEventListener(\"change\",applyGrid);};},[desktopColumns,mobileColumns,gridBreakpoint]);if(RenderTarget.current()===RenderTarget.canvas){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",minHeight,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"#f4f4f5\",color:\"#71717a\",fontFamily:\"sans-serif\",fontSize:14,borderRadius:8},children:\"Squad placement (preview to load)\"});}return /*#__PURE__*/_jsx(\"div\",{ref:ref,id:containerId,className:\"axle-widget-container\",style:{width:\"100%\",minHeight}});}addPropertyControls(SquadPlacementWidget,{scriptSrc:{type:ControlType.String,title:\"Script URL\",defaultValue:\"https://widgets.axl3.io/custom/athletic-clubs/squad-placement-widget.js\"},widgetId:{type:ControlType.String,title:\"Widget ID\",defaultValue:\"3f8c2a7e-91b4-4d6f-8a2e-5c1b9d4e7f02\"},sessionName:{type:ControlType.String,title:\"Session Name\",defaultValue:\"Squad Placement Call\"},minHeight:{type:ControlType.Number,title:\"Min Height\",defaultValue:400,min:0,max:2e3,unit:\"px\"},desktopColumns:{type:ControlType.Number,title:\"Desktop Columns\",defaultValue:3,min:1,max:6,step:1,displayStepper:true},mobileColumns:{type:ControlType.Number,title:\"Mobile Columns\",defaultValue:2,min:1,max:4,step:1,displayStepper:true},gridBreakpoint:{type:ControlType.Number,title:\"Breakpoint\",defaultValue:768,min:320,max:1440,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SquadPlacementWidget\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Schedule_a_Class.map"],"mappings":"wMAeG,SAAS,GAAoB,CAAC,GAAG,SAAS,eAAe,4BAA4B,CAAC,OAAO,IAAM,EAAM,SAAS,cAAc,QAAQ,CAAC,EAAM,GAAG,4BAA4B,EAAM,YAAY;;;;;;;;;MAS7L,SAAS,KAAK,YAAY,EAAM,CAAE,SAAwB,EAAqB,CAAC,YAAU,0EAA0E,WAAS,uCAAuC,cAAY,uBAAuB,YAAU,IAAI,iBAAe,EAAE,gBAAc,EAAE,iBAAe,KAAK,CAAC,IAAM,EAAIA,EAAO,KAAK,CAAO,EAAY,mBAAmBC,GAAO,CAAC,QAAQ,OAAO,GAAG,CAE2a,OAF1a,MAAc,CAAC,GAAG,EAAa,SAAS,GAAG,EAAa,OAAO,OAAO,IAAM,EAAG,EAAI,QAAQ,GAAG,CAAC,EAAG,OAAO,GAAoB,CAAC,IAAM,EAAO,SAAS,cAAc,SAAS,CAAgO,MAA/N,GAAO,IAAI,EAAU,EAAO,MAAM,GAAK,EAAO,aAAa,iBAAiB,EAAY,CAAC,EAAO,aAAa,iBAAiB,EAAS,CAAC,EAAO,aAAa,oBAAoB,EAAY,CAAC,SAAS,KAAK,YAAY,EAAO,KAAW,CAAC,EAAO,QAAQ,CAAC,IAAM,EAAI,EAAO,YAAe,GAAK,OAAO,EAAI,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