{"version":3,"file":"LuxRecoWidget.zNfdeftk.mjs","names":["React.useRef","React.useState","__esmMin","init_npm_react_18_3_1","_e","de","init_jsx_runtime","c","ce","init_framer_BpuvUAiZ","addPropertyControls","ControlType","LuxRecoWidget","props","ref","show","setShow","el","io","entries","style","init_LuxRecoWidget"],"sources":["https:/framerusercontent.com/modules/np4ghkotOnkVeiO84DAP/3GySovk4l3vLjxN4OhLX/LuxRecoWidget.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Reco-omdömeswidget som laddas först när den är nära att synas.\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function LuxRecoWidget(props){const{src,title=\"Lux St\\xe4d - Omd\\xf6men p\\xe5 Reco\",height=985,style}=props;const ref=React.useRef(null);const[show,setShow]=React.useState(false);React.useEffect(()=>{const el=ref.current;if(!el)return;if(typeof IntersectionObserver===\"undefined\"){setShow(true);return;}const io=new IntersectionObserver(entries=>{if(entries.some(e=>e.isIntersecting)){setShow(true);io.disconnect();}},{rootMargin:\"300px 0px\"});io.observe(el);return()=>io.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{width:\"100%\",height,...style},children:show?/*#__PURE__*/_jsx(\"iframe\",{src:src,title:title,loading:\"lazy\",height:height,style:{width:\"100%\",height,border:0,display:\"block\",overflow:\"hidden\"}}):null});}addPropertyControls(LuxRecoWidget,{src:{type:ControlType.String,title:\"Widget-URL\",defaultValue:\"https://widget.reco.se/v2/venues/6007119/vertical/large?inverted=false&border=true&lang=sv&reviews=5\"},title:{type:ControlType.String,title:\"Titel\",defaultValue:\"Lux St\\xe4d - Omd\\xf6men p\\xe5 Reco\"},height:{type:ControlType.Number,title:\"H\\xf6jd\",defaultValue:985,min:100,max:3e3}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LuxRecoWidget\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LuxRecoWidget.map"],"mappings":"A,wLAIG,SAAwBY,EAAc,EAAM,CAAC,GAAK,CAAC,MAAI,QAAM,6BAAsC,SAAO,IAAI,SAAOC,EAAYC,EAAId,EAAa,IAAI,EAAO,CAACe,EAAKC,GAASf,EAAe,EAAK,EAA0T,OAAxTO,MAAoB,CAAC,IAAMS,EAAGH,EAAI,QAAQ,GAAG,CAACG,EAAG,OAAO,GAAG,OAAO,qBAAuB,IAAY,CAACD,EAAQ,EAAI,EAAE,MAAO,CAAC,IAAME,EAAG,IAAI,qBAAqB,GAAS,CAAIC,EAAQ,KAAK,GAAG,EAAE,cAAc,IAAGH,EAAQ,EAAI,EAAEE,EAAG,WAAW,EAAG,EAAE,CAAC,WAAW,WAAW,CAAC,EAAiB,OAAfA,EAAG,QAAQD,CAAE,MAAYC,EAAG,WAAW,CAAE,EAAE,CAAC,CAAC,EAAsB,gBAAK,MAAM,CAAK,MAAI,MAAM,CAAC,MAAM,OAAO,SAAO,GAAGE,CAAK,EAAE,SAASL,EAAkB,gBAAK,SAAS,CAAK,MAAU,QAAM,QAAQ,OAAc,SAAO,MAAM,CAAC,MAAM,OAAO,SAAO,OAAO,EAAE,QAAQ,QAAQ,SAAS,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAE,C,0CAACL,EAAoBE,EAAc,CAAC,IAAI,CAAC,KAAKD,EAAY,OAAO,MAAM,aAAa,aAAa,sGAAsG,EAAE,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,QAAQ,aAAa,4BAAqC,EAAE,OAAO,CAAC,KAAKA,EAAY,OAAO,MAAM,OAAU,aAAa,IAAI,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,C"}