{"version":3,"file":"FormTimeRestrictions.DGF0eptl.mjs","names":[],"sources":["https:/framerusercontent.com/modules/in98tu6Yer66ggMHQ7a7/T3YEM4GMMIWP7DTKnAGM/FormDateRestrictions.js","https:/framerusercontent.com/modules/KGwUDBGqVou8jp9qtLiW/S0syAtDRxoLTRyygoqHi/FormTimeRestrictions.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function withDisabledWeekends(Component){return props=>{const minDate=new Date(\"2025-01-01\").toISOString().split(\"T\")[0];useEffect(()=>{const input=document.querySelector(`input[type=\"date\"]`);if(input){input.setAttribute(\"onkeydown\",\"return false\");input.addEventListener(\"change\",()=>{const selectedDate=new Date(input.value);const dayOfWeek=selectedDate.getUTCDay();if(dayOfWeek===0||dayOfWeek===6){alert(\"Sorry, we don’t offer service on weekends. Please choose a weekday.\");input.value=\"\";}});}},[]);// ❌ Antes: defaultValue={minDate}\n// ✅ Ahora: solo pasamos min, sin defaultValue\nreturn /*#__PURE__*/_jsx(Component,{...props,min:minDate});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDisabledWeekends\":{\"type\":\"reactHoc\",\"name\":\"withDisabledWeekends\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FormDateRestrictions.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function withTimeRange(Component){return props=>{const minTime=\"09:00\";const maxTime=\"17:00\";useEffect(()=>{const input=document.querySelector(`input[type=\"time\"]`);if(input){// Bloquear escritura manual\ninput.setAttribute(\"onkeydown\",\"return false\");input.addEventListener(\"change\",()=>{const value=input.value;if(value){const[hours,minutes]=value.split(\":\").map(Number);const totalMinutes=hours*60+minutes;const minMinutes=9*60// 09:00\n;const maxMinutes=17*60// 17:00\n;if(totalMinutes<minMinutes||totalMinutes>maxMinutes){alert(\"Please select a time between 9 AM and 5 PM.\");input.value=\"\";}}});}},[]);return /*#__PURE__*/_jsx(Component,{...props,min:minTime,max:maxTime});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTimeRange\":{\"type\":\"reactHoc\",\"name\":\"withTimeRange\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FormTimeRestrictions.map"],"mappings":"kHAAwE,SAAgB,EAAqB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAQ,IAAI,KAAK,aAAa,CAAC,aAAa,CAAC,MAAM,IAAI,CAAC,GAErM,OAFwM,MAAc,CAAC,IAAM,EAAM,SAAS,cAAc,qBAAqB,CAAI,IAAO,EAAM,aAAa,YAAY,eAAe,CAAC,EAAM,iBAAiB,aAAa,CAA0C,IAAM,EAA5B,IAAI,KAAK,EAAM,MAAM,CAA8B,WAAW,EAAI,IAAY,GAAG,IAAY,KAAG,MAAM,sEAAsE,CAAC,EAAM,MAAM,KAAM,GAAI,EAAE,CAAC,CAEnjB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,EAAQ,CAAC,mBAFf,IAA6B,ICAA,SAAgB,EAAc,EAAU,CAAC,MAAO,KAAoD,MAAc,CAAC,IAAM,EAAM,SAAS,cAAc,qBAAqB,CAAI,IACvP,EAAM,aAAa,YAAY,eAAe,CAAC,EAAM,iBAAiB,aAAa,CAAC,IAAM,EAAM,EAAM,MAAM,GAAG,EAAM,CAAC,GAAK,CAAC,EAAM,GAAS,EAAM,MAAM,IAAI,CAAC,IAAI,OAAO,CAAO,EAAa,EAAM,GAAG,GAEhM,EAFyN,KAEhM,EADX,QACoC,MAAM,8CAA8C,CAAC,EAAM,MAAM,MAAO,GAAI,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,QAAQ,IAAI,QAAQ,CAAC,mBAHjK,IAA6B"}