{"version":3,"file":"DatePickerBooking.CF8eTPI2.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/y3k2YFp8ygNzaZSOBCPD/NBU1YTwBQPplIbRYlusz/DatePickerBooking.js"],"sourcesContent":["// Date picker component that generates a booking URL with arrival and departure dates - Mobile Optimized\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Date Picker Booking - Mobile Optimized\n *\n * @framerIntrinsicWidth 320\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function DatePickerBooking(props){const{baseUrl,numberOfAdults,buttonLabel,backgroundColor,textColor,buttonColor,buttonTextColor,font,buttonFont,borderRadius}=props;const[arrivalDate,setArrivalDate]=useState(\"\");const[departureDate,setDepartureDate]=useState(\"\");const formatDateToMMDDYYYY=dateString=>{if(!dateString)return\"\";const[year,month,day]=dateString.split(\"-\");return`${month}/${day}/${year}`;};const formatDateForDisplay=dateString=>{if(!dateString)return\"\";const[year,month,day]=dateString.split(\"-\");const shortYear=year.slice(-2);return`${month}/${day}/${shortYear}`;};const handleBooking=()=>{if(!arrivalDate||!departureDate){alert(\"Please select both arrival and departure dates\");return;}const formattedArrival=formatDateToMMDDYYYY(arrivalDate);const formattedDeparture=formatDateToMMDDYYYY(departureDate);const bookingUrl=`${baseUrl}?start_date=${formattedArrival}&end_date=${formattedDeparture}&number_of_adults=${numberOfAdults}`;if(typeof window!==\"undefined\"){window.open(bookingUrl,\"_blank\");}};return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",backgroundColor,color:textColor,display:\"flex\",flexDirection:\"row\",alignItems:\"center\",justifyContent:\"center\",gap:6,padding:12,width:\"100%\",height:\"100%\",boxSizing:\"border-box\",...font},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .date-input-hidden::-webkit-datetime-edit { opacity: 0; }\n                    .date-input-hidden::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; position: absolute; width: 100%; height: 100%; left: 0; top: 0; }\n                    .date-input-visible::-webkit-datetime-edit { opacity: 0; }\n                    .date-input-visible::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; position: absolute; width: 100%; height: 100%; left: 0; top: 0; }\n                `}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",flex:.8,display:\"flex\",minWidth:0,maxWidth:180},children:[!arrivalDate&&/*#__PURE__*/_jsxs(\"span\",{style:{position:\"absolute\",left:\"50%\",top:\"50%\",transform:\"translate(-50%, -50%)\",pointerEvents:\"none\",color:textColor,fontSize:14,opacity:.8,textTransform:\"uppercase\",letterSpacing:\"0.5px\",fontWeight:600,display:\"flex\",alignItems:\"center\",gap:4,whiteSpace:\"nowrap\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 16 16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"rect\",{x:\"2\",y:\"3\",width:\"12\",height:\"11\",rx:\"1\",stroke:\"currentColor\",strokeWidth:\"1.5\",fill:\"none\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"2\",y1:\"6\",x2:\"14\",y2:\"6\",stroke:\"currentColor\",strokeWidth:\"1.5\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"5\",y1:\"1\",x2:\"5\",y2:\"4\",stroke:\"currentColor\",strokeWidth:\"1.5\",strokeLinecap:\"round\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"11\",y1:\"1\",x2:\"11\",y2:\"4\",stroke:\"currentColor\",strokeWidth:\"1.5\",strokeLinecap:\"round\"})]}),\"Date\"]}),arrivalDate&&/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",left:\"50%\",top:\"50%\",transform:\"translate(-50%, -50%)\",pointerEvents:\"none\",color:textColor,fontSize:11,fontWeight:600,whiteSpace:\"nowrap\"},children:formatDateForDisplay(arrivalDate)}),/*#__PURE__*/_jsx(\"input\",{type:\"date\",value:arrivalDate,onChange:e=>startTransition(()=>setArrivalDate(e.target.value)),className:arrivalDate?\"date-input-visible\":\"date-input-hidden\",style:{width:\"100%\",padding:\"8px 12px\",border:`1px solid ${textColor}`,backgroundColor:\"white\",color:textColor,fontSize:14,fontFamily:\"inherit\",cursor:\"pointer\",outline:\"none\",borderRadius:`${borderRadius}px`,textAlign:\"center\",fontWeight:600,minHeight:36,boxSizing:\"border-box\"}})]}),/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 20 20\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",style:{flexShrink:0},children:/*#__PURE__*/_jsx(\"path\",{d:\"M7 4L13 10L7 16\",stroke:\"#FFFFFF\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",flex:.8,display:\"flex\",minWidth:0,maxWidth:180,marginRight:8},children:[!departureDate&&/*#__PURE__*/_jsxs(\"span\",{style:{position:\"absolute\",left:\"50%\",top:\"50%\",transform:\"translate(-50%, -50%)\",pointerEvents:\"none\",color:textColor,fontSize:14,opacity:.8,textTransform:\"uppercase\",letterSpacing:\"0.5px\",fontWeight:600,display:\"flex\",alignItems:\"center\",gap:4,whiteSpace:\"nowrap\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 16 16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"rect\",{x:\"2\",y:\"3\",width:\"12\",height:\"11\",rx:\"1\",stroke:\"currentColor\",strokeWidth:\"1.5\",fill:\"none\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"2\",y1:\"6\",x2:\"14\",y2:\"6\",stroke:\"currentColor\",strokeWidth:\"1.5\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"5\",y1:\"1\",x2:\"5\",y2:\"4\",stroke:\"currentColor\",strokeWidth:\"1.5\",strokeLinecap:\"round\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"11\",y1:\"1\",x2:\"11\",y2:\"4\",stroke:\"currentColor\",strokeWidth:\"1.5\",strokeLinecap:\"round\"})]}),\"Date\"]}),departureDate&&/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",left:\"50%\",top:\"50%\",transform:\"translate(-50%, -50%)\",pointerEvents:\"none\",color:textColor,fontSize:11,fontWeight:600,whiteSpace:\"nowrap\"},children:formatDateForDisplay(departureDate)}),/*#__PURE__*/_jsx(\"input\",{type:\"date\",value:departureDate,min:arrivalDate,onChange:e=>startTransition(()=>setDepartureDate(e.target.value)),className:departureDate?\"date-input-visible\":\"date-input-hidden\",style:{width:\"100%\",padding:\"8px 12px\",border:`1px solid ${textColor}`,backgroundColor:\"white\",color:textColor,fontSize:14,fontFamily:\"inherit\",cursor:\"pointer\",outline:\"none\",borderRadius:`${borderRadius}px`,textAlign:\"center\",fontWeight:600,minHeight:36,boxSizing:\"border-box\"}})]}),/*#__PURE__*/_jsx(\"button\",{onClick:handleBooking,style:{padding:\"8px 12px\",border:\"none\",backgroundColor:buttonColor,color:buttonTextColor,cursor:\"pointer\",whiteSpace:\"nowrap\",textTransform:\"uppercase\",letterSpacing:\"0.5px\",borderRadius:`${borderRadius}px`,minHeight:36,fontSize:14,fontWeight:600,flex:.4,boxSizing:\"border-box\",...buttonFont},children:buttonLabel})]});}addPropertyControls(DatePickerBooking,{baseUrl:{type:ControlType.String,title:\"Base URL\",defaultValue:\"https://secure.thinkreservations.com/reynoldsmansion/reservations/availability\"},numberOfAdults:{type:ControlType.Number,title:\"Adults\",defaultValue:2,min:1,max:10,step:1},buttonLabel:{type:ControlType.String,title:\"Button Label\",defaultValue:\"See Availability\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(0, 0, 0, 0)\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#000000\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#FFFFFF\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DatePickerBooking\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"320\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DatePickerBooking.map"],"mappings":"sMASG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,UAAQ,iBAAe,cAAY,kBAAgB,YAAU,cAAY,kBAAgB,OAAK,aAAW,gBAAc,EAAW,CAAC,EAAY,GAAgBA,EAAS,GAAG,CAAM,CAAC,EAAc,GAAkBA,EAAS,GAAG,CAAO,EAAqB,GAAY,CAAC,GAAG,CAAC,EAAW,MAAM,GAAG,GAAK,CAAC,EAAK,EAAM,GAAK,EAAW,MAAM,IAAI,CAAC,MAAM,GAAG,EAAM,GAAG,EAAI,GAAG,KAAe,EAAqB,GAAY,CAAC,GAAG,CAAC,EAAW,MAAM,GAAG,GAAK,CAAC,EAAK,EAAM,GAAK,EAAW,MAAM,IAAI,CAAgC,MAAM,GAAG,EAAM,GAAG,EAAI,GAArC,EAAK,MAAM,GAAG,I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