{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/GDuM1v9vQNoKR4jLJuBn/9t3VXA7v4ashnNvrDgEh/CurrentDate.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export const withCurrentDate=()=>{const formatDate=date=>{const months=[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];const day=date.getDate();const month=months[date.getMonth()]// Use the months array to get the month name\n;const year=date.getFullYear();return`${month} ${day}, ${year}`;};return{text:formatDate(new Date)};};export function withTitleFromInput(Component){return props=>{const[title,setTitle]=useState(\"Untitled Article\");useEffect(()=>{const handleTitleChange=()=>{const titleInput=document.querySelector('[name=\"Title Input\"]');if(titleInput){// Check if the input value is empty and set title accordingly\nconst inputValue=titleInput.firstChild.value;setTitle(inputValue?inputValue:\"Untitled Article\");}};const titleInput=document.querySelector('[name=\"Title Input\"]');titleInput===null||titleInput===void 0?void 0:titleInput.addEventListener(\"input\",handleTitleChange);return()=>{titleInput===null||titleInput===void 0?void 0:titleInput.removeEventListener(\"input\",handleTitleChange);};},[]);return /*#__PURE__*/_jsx(Component,{...props,text:title});};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withwithCurrentDate(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...withCurrentDate(props)});};}withwithCurrentDate.displayName=\"withCurrentDate\";\nexport const __FramerMetadata__ = {\"exports\":{\"withCurrentDate\":{\"type\":\"override\",\"name\":\"withCurrentDate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withwithCurrentDate\":{\"type\":\"reactHoc\",\"name\":\"withwithCurrentDate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTitleFromInput\":{\"type\":\"reactHoc\",\"name\":\"withTitleFromInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CurrentDate.map"],
  "mappings": "uGAAwF,IAAMA,EAAgB,KACtC,CAAC,MAD2DC,GAAM,CAAC,IAAMC,EAAO,CAAC,UAAU,WAAW,QAAQ,QAAQ,MAAM,OAAO,OAAO,SAAS,YAAY,UAAU,WAAW,UAAU,EAAQC,EAAIF,EAAK,QAAQ,EAAQG,EAAMF,EAAOD,EAAK,SAAS,CAAC,EAC5TI,EAAKJ,EAAK,YAAY,EAAE,MAAM,GAAGG,CAAK,IAAID,CAAG,KAAKE,CAAI,EAAG,GAAyB,IAAI,IAAI,CAAC,GAAW,SAASC,EAAmBC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAMC,CAAQ,EAAEC,EAAS,kBAAkB,EAAE,OAAAC,EAAU,IAAI,CAAC,IAAMC,EAAkB,IAAI,CAAC,IAAMC,EAAW,SAAS,cAAc,sBAAsB,EAAE,GAAGA,EAAW,CAChV,IAAMC,EAAWD,EAAW,WAAW,MAAMJ,EAASK,GAAsB,kBAAkB,CAAE,CAAC,EAAQD,EAAW,SAAS,cAAc,sBAAsB,EAAE,OAA8CA,GAAW,iBAAiB,QAAQD,CAAiB,EAAQ,IAAI,CAA+CC,GAAW,oBAAoB,QAAQD,CAAiB,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsBG,EAAKT,EAAU,CAAC,GAAGC,EAAM,KAAKC,CAAK,CAAC,CAAE,CAAE,CAA2J,SAASQ,EAAoBC,EAAE,CAAC,OAAOV,IAAQW,EAA+BC,CAAuC,EAASJ,EAAKE,EAAE,CAAC,GAAGV,EAAM,GAAGR,EAAgBQ,CAAK,CAAC,CAAC,EAAI,CAACS,EAAoB,YAAY",
  "names": ["withCurrentDate", "date", "months", "day", "month", "year", "withTitleFromInput", "Component", "props", "title", "setTitle", "ye", "ue", "handleTitleChange", "titleInput", "inputValue", "p", "withwithCurrentDate", "C", "re", "DataObserverContext"]
}
