{"version":3,"file":"Book_Now_Button.IfNWBy-T.mjs","names":[],"sources":["https:/framerusercontent.com/modules/ZSHpnFWItX8NbRYS29Tk/lskU5SYEuklFDOpK7BTE/Book_Now_Button.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";function getFormattedDates(){const today=new Date;let currentDate;let currentFormattedDate,nextFormattedDate;const dayOfWeek=today.getDay()// 0 = Sunday, 1 = Monday, ..., 6 = Saturday\n;if(dayOfWeek===0||dayOfWeek===1||dayOfWeek===2){// Calculate the next closest Wednesday\nconst daysUntilWednesday=3-dayOfWeek;let nextWednesday=new Date(today);nextWednesday.setDate(today.getDate()+daysUntilWednesday);currentDate=nextWednesday;currentFormattedDate=formatDate(nextWednesday);}else{// Today is Wednesday, Thursday, Friday, or Saturday\ncurrentDate=today;currentFormattedDate=formatDate(today);}let nextDate=new Date(currentDate);let currentDayOfWeek=nextDate.getDay();if(currentDayOfWeek===6){// If currentFormattedDate is a Saturday\nnextDate.setDate(nextDate.getDate()+1);}else{nextDate.setDate(nextDate.getDate()+2)// change to 2 for 2 day min\n;}nextFormattedDate=formatDate(nextDate);return{currentFormattedDate,nextFormattedDate};}function formatDate(date){const year=date.getFullYear();const month=String(date.getMonth()+1).padStart(2,\"0\")// Months are 0-based\n;const day=String(date.getDate()).padStart(2,\"0\");return`${year}-${month}-${day}`;}export function BookNow(Component){const dates=getFormattedDates();return props=>{return /*#__PURE__*/_jsx(\"a\",{onClick:e=>{e.preventDefault();const d=getFormattedDates();window.open(`https://hotels.cloudbeds.com/en/reservation/VuMpPK`);},href:`https://hotels.cloudbeds.com/en/reservation/VuMpPK`,target:\"_blank\",style:{padding:12,borderRadius:\"2px\",backgroundColor:\"#000\",display:\"block\",color:\"white\",textDecoration:\"none\",textAlign:\"center\"},children:\"CHECK AVAILABILITY\"});};}export function BookNowOutline(Component){const dates=getFormattedDates();return props=>{return /*#__PURE__*/_jsx(\"a\",{onClick:e=>{e.preventDefault();const d=getFormattedDates();window.open(`https://hotels.cloudbeds.com/en/reservation/VuMpPK`);},className:\"button-outline-hover\",href:`https://hotels.cloudbeds.com/en/reservation/VuMpPK`,target:\"_blank\",style:{padding:10,borderRadius:\"2px\",backgroundColor:\"#fff\",border:\"1px solid #000\",display:\"block\",color:\"#000\",textDecoration:\"none\"},children:\"CHECK AVAILABILITY\"});};}//  <a\n//                 onClick={(e) => {\n//                     e.preventDefault()\n//                     const d = getFormattedDates()\n//                     window.open(\n//                         `https://hotels.cloudbeds.com/en/reservation/VuMpPK/?currency=usd&checkin=${d.currentFormattedDate}&checkout=${d.nextFormattedDate}`\n//                     )\n//                 }}\n//                 href={`https://hotels.cloudbeds.com/en/reservation/VuMpPK/?currency=usd&checkin=${dates.currentFormattedDate}&checkout=${dates.nextFormattedDate}`}\n//                 target=\"_blank\"\n//                 style={{\n//                     padding: 12,\n//                     borderRadius: \"2px\",\n//                     backgroundColor: \"#000\",\n//                     display: \"block\",\n//                     color: \"white\",\n//                     textDecoration: \"none\",\n//                     textAlign: \"center\",\n//                 }}\n//             >\n//                 CHECK AVAILABILITY\n//             </a>\n\nexport const __FramerMetadata__ = {\"exports\":{\"BookNow\":{\"type\":\"reactHoc\",\"name\":\"BookNow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"BookNowOutline\":{\"type\":\"reactHoc\",\"name\":\"BookNowOutline\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Book_Now_Button.map"],"mappings":"kKAA2C,SAAS,GAAmB,CAAC,IAAM,EAAM,IAAI,KAAS,EAAgB,EAAqB,EAAwB,EAAU,EAAM,SAC7K,GAAG,IAAY,GAAG,IAAY,GAAG,IAAY,EAAE,CAChD,IAAM,EAAmB,EAAE,EAAc,EAAc,IAAI,KAAK,GAAO,EAAc,QAAQ,EAAM,UAAU,GAAoB,EAAY,EAAc,EAAqB,EAAW,EAAgB,MAC3M,EAAY,EAAM,EAAqB,EAAW,OAAY,EAAS,IA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