{"version":3,"file":"ApplyToday.BiQ8ofzF.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,IAAI,EAG7M,OAH+M,MAAc,CAAC,IAAM,EAAI,IAAI,KAAW,EAAM,EAAW,CAAG,EAAQ,EAAa,IAAI,KAAK,EAAa,QAAQ,EAAI,QAAQ,EAAE,CAAC,EAAE,IAAM,EAAS,EAAW,CAAY,EAAE,EAAS,CAAC,QAAM,UAAQ,CAAC,CAE/iB,EAAE,CAAC,CAAC,EACA,EAA+K,EAAK,EAAU,CAAtD,GAAG,EAAM,GAAG,CAA2D,CAAC,EAAjI,EAAK,EAAU,CAAlE,GAAG,EAAM,MAAM,GAAG,SAAS,EAAwD,CAAC,CAAkG,CAAE,mBAH9K,IAAsC,EAAO,EAAW,GAAkJ,GAAhI,EAAK,YAAiI,EAAE,GAAzG,OAAO,EAAK,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,GAA2E,EAAE,GAA9D,OAAO,EAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,GAAiC"}