{"version":3,"file":"ApplyToday.Cn61dT8J.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/XoEfKSbmI2LxrvZJlmMS/yFygOtpBdvumAynwYO39/ApplyToday.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";const formatDate=date=>{const year=date.getFullYear();const month=String(date.getMonth()+1).padStart(2,\"0\");const day=String(date.getDate()).padStart(2,\"0\");return`${year}-${month}-${day}`;};export function withTodaysDate(Component){return props=>{const[dates,setDates]=useState(null);useEffect(()=>{const now=new Date;const today=formatDate(now);const tomorrowDate=new Date;tomorrowDate.setDate(now.getDate()+1);const tomorrow=formatDate(tomorrowDate);setDates({today,tomorrow});// Note: If exact midnight rollovers on long-open tabs are critical,\n// you could set a setTimeout here to refresh the state at midnight.\n},[]);// Strict TypeScript cast without using the dreaded 'any'\nif(!dates){const fallbackProps={...props,today:\"\",tomorrow:\"\"};return /*#__PURE__*/_jsx(Component,{...fallbackProps});}const combinedProps={...props,...dates};return /*#__PURE__*/_jsx(Component,{...combinedProps});};}\nexport const __FramerMetadata__ = {\"exports\":{\"WithDateProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTodaysDate\":{\"type\":\"reactHoc\",\"name\":\"withTodaysDate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ApplyToday.map"],"mappings":"yHAAgR,SAAgB,EAAe,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,KAAK,CAG9M,OAH+M,MAAc,CAAC,IAAM,EAAI,IAAI,KAAW,EAAM,EAAW,EAAI,CAAO,EAAa,IAAI,KAAK,EAAa,QAAQ,EAAI,SAAS,CAAC,EAAE,CAAyC,EAAS,CAAC,QAAM,SAAzC,EAAW,EAAa,CAA0B,CAAC,EAE9iB,EAAE,CAAC,CACD,EAA+K,EAAK,EAAU,CAAtD,GAAG,EAAM,GAAG,EAA4D,CAAC,CAAlI,EAAK,EAAU,CAAlE,GAAG,EAAM,MAAM,GAAG,SAAS,GAAyD,CAAC,qBAH1E,IAAsC,CAAM,EAAW,GAAkJ,GAAhI,EAAK,aAAa,CAAsH,GAAzG,OAAO,EAAK,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAyE,GAA9D,OAAO,EAAK,SAAS,CAAC,CAAC,SAAS,EAAE,IAAI"}