{"version":3,"file":"Resevation_code_2.C23ujFLH.mjs","names":["useRef","React"],"sources":["https:/framerusercontent.com/modules/x3VvueJqUBUYrF55g7IM/Xbo2bqyWmpzaocWuxRP8/Resevation_code_2.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import React,{useEffect,useRef}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 600\n */export default function KrossEmbedComplete(props){const{containerStyle,showBorder=false,borderColor=\"#09F\",borderRadius=8,padding=0,style}=props;const containerRef=useRef(null);const[isLoaded,setIsLoaded]=React.useState(false);// Carica tutti gli script e stili necessari\nuseEffect(()=>{const loadKrossWidget=()=>{// Carica jQuery se non è presente\nif(!window.jQuery){const jqueryScript=document.createElement(\"script\");jqueryScript.src=\"https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js\";jqueryScript.onload=()=>{loadKrossResources();};document.head.appendChild(jqueryScript);}else{loadKrossResources();}};const loadKrossResources=()=>{// Carica CSS\nconst link=document.createElement(\"link\");link.rel=\"stylesheet\";link.type=\"text/css\";link.href=\"https://data.krossbooking.com/widget/v6/mystay/4.css\";link.media=\"all\";document.head.appendChild(link);// Carica JS\nconst script=document.createElement(\"script\");script.type=\"text/javascript\";script.defer=true;script.src=\"https://data.krossbooking.com/widget/v6/mystay/4.js\";script.onload=()=>{setIsLoaded(true);};document.head.appendChild(script);};loadKrossWidget();},[]);// Preview per il canvas di Framer\nif(RenderTarget.current()===RenderTarget.canvas){return /*#__PURE__*/_jsx(motion.div,{style:{...style,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#f5f5f5\",border:\"2px dashed #09F\",borderRadius:\"8px\",padding:\"0px\",minHeight:\"90px\"},initial:{opacity:0},animate:{opacity:1},children:/*#__PURE__*/_jsxs(\"div\",{style:{textAlign:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"24px\",marginBottom:\"10px\",color:\"#09F\"},children:\"🏨\"}),/*#__PURE__*/_jsx(\"h3\",{style:{margin:\"0 0 10px 0\",color:\"#333\"},children:\"Widget Kross Booking\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0\",color:\"#666\",fontSize:\"14px\"},children:\"Il widget di prenotazione sar\\xe0 visibile in anteprima\"})]})});}return /*#__PURE__*/_jsxs(motion.div,{style:{...style,minHeight:\"90px\",position:\"relative\"},initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:[/*#__PURE__*/_jsx(\"div\",{style:{...containerStyle,border:showBorder?`2px solid ${borderColor}`:\"none\",borderRadius:`${borderRadius}px`,padding:`${padding}px`,backgroundColor:\"transparent\",width:\"100%\",minHeight:\"90px\"},children:/*#__PURE__*/_jsx(\"div\",{ref:containerRef,className:\"kross-container\",style:{width:\"100%\",minHeight:\"90px\"}})}),!isLoaded&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"10px\",right:\"10px\",background:\"rgba(0,0,0,0.7)\",color:\"white\",padding:\"5px 10px\",borderRadius:\"4px\",fontSize:\"12px\"},children:\"Caricamento...\"})]});}// Props di default\nKrossEmbedComplete.defaultProps={showBorder:false,borderColor:\"#09F\",borderRadius:8,padding:0};// Property Controls per Framer\naddPropertyControls(KrossEmbedComplete,{showBorder:{type:ControlType.Boolean,title:\"Mostra Bordo\",description:\"Mostra un bordo attorno al widget\",defaultValue:false},borderColor:{type:ControlType.Color,title:\"Colore Bordo\",description:\"Colore del bordo\",defaultValue:\"#09F\",hidden:props=>!props.showBorder},borderRadius:{type:ControlType.Number,title:\"Raggio Bordi\",description:\"Raggio degli angoli arrotondati\",min:0,max:50,unit:\"px\",defaultValue:8},padding:{type:ControlType.Number,title:\"Spaziatura\",description:\"Spaziatura interna del container\",min:0,max:100,unit:\"px\",defaultValue:20}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KrossEmbedComplete\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"* @framerSupportedLayoutWidth any\",\"framerIntrinsicHeight\":\"600\",\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Resevation_code_2.map"],"mappings":"kaAMG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,iBAAe,aAAW,GAAM,cAAY,OAAO,eAAa,EAAE,UAAQ,EAAE,SAAO,EAAY,EAAaA,EAAO,KAAK,CAAM,CAAC,EAAS,GAAaC,EAAM,SAAS,GAAM,CAKye,OAJ9sB,MAAc,CAAC,IAAM,MAAoB,CACzC,GAAI,EAAO,OAAwO,GAAoB,KAArP,CAAC,IAAM,EAAa,SAAS,cAAc,SAAS,CAAC,EAAa,IAAI,6DAA6D,EAAa,WAAW,CAAC,GAAoB,EAAG,SAAS,KAAK,YAAY,EAAa,GAAqC,MAAuB,CACxS,IAAM,EAAK,SAAS,cAAc,OAAO,CAAC,EAAK,IAAI,aAAa,EAAK,KAAK,WAAW,EAAK,KAAK,uDAAuD,EAAK,MAAM,MAAM,SAAS,KAAK,YAAY,EAAK,CACtM,IAAM,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,KAAK,kBAAkB,EAAO,MAAM,GAAK,EAAO,IAAI,sDAAsD,EAAO,WAAW,CAAC,EAAY,GAAK,EAAG,SAAS,KAAK,YAAY,EAAO,EAAG,GAAiB,EAAG,EAAE,CAAC,CAC9P,EAAa,SAAS,GAAG,EAAa,OAA4B,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAM,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,gBAAgB,UAAU,OAAO,kBAAkB,aAAa,MAAM,QAAQ,MAAM,UAAU,OAAO,CAAC,QAAQ,CAAC,QAAQ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