{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/i2UHog4Z3Ynl0pWzucti/FUpnjE1d3TuOqHVOxHf8/InputLowerCase.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";export function withTextChangeListener(Component){return function WrappedComponent(props){const[text,setText]=useState(\"\")// State to store lowercase text\n;const wrapperRef=useRef(null)// Ref to access the wrapper element\n;useEffect(()=>{var _wrapperRef_current;// Find the child input element within the wrapper\nconst input=(_wrapperRef_current=wrapperRef.current)===null||_wrapperRef_current===void 0?void 0:_wrapperRef_current.querySelector(\"input\");if(input){// Set initial value to lowercase text state\ninput.value=text;// Event handler for input changes\nconst handleChange=event=>{const newText=event.target.value.toLowerCase()// Convert to lowercase\n;setText(newText)// Update state\n;console.log(\"Text changed:\",newText)// Listener action\n;};// Attach input change event listener\ninput.addEventListener(\"input\",handleChange);// Cleanup event listener on component unmount\nreturn()=>{input.removeEventListener(\"input\",handleChange);};}},[text])// Re-run if `text` changes\n;return /*#__PURE__*/_jsx(Component,{...props,ref:wrapperRef});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTextChangeListener\":{\"type\":\"reactHoc\",\"name\":\"withTextChangeListener\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InputLowerCase.map"],
  "mappings": "8DAA+F,SAASA,EAAuBC,EAAU,CAAC,OAAO,SAA0BC,EAAM,CAAC,GAAK,CAACC,EAAKC,CAAO,EAAEC,EAAS,EAAE,EAC1MC,EAAWC,EAAO,IAAI,EAC5B,OAAAC,EAAU,IAAI,CAAC,IAAIC,EACpB,IAAMC,GAAOD,EAAoBH,EAAW,WAAW,MAAMG,IAAsB,OAAO,OAAOA,EAAoB,cAAc,OAAO,EAAE,GAAGC,EAAM,CACrJA,EAAM,MAAMP,EACZ,IAAMQ,EAAaC,GAAO,CAAC,IAAMC,EAAQD,EAAM,OAAO,MAAM,YAAY,EACvER,EAAQS,CAAO,EACf,QAAQ,IAAI,gBAAgBA,CAAO,CACnC,EACD,OAAAH,EAAM,iBAAiB,QAAQC,CAAY,EACrC,IAAI,CAACD,EAAM,oBAAoB,QAAQC,CAAY,CAAE,EAAG,EAAE,CAACR,CAAI,CAAC,EACjD,EAAKF,EAAU,CAAC,GAAGC,EAAM,IAAII,CAAU,CAAC,CAAE,CAAE",
  "names": ["withTextChangeListener", "Component", "props", "text", "setText", "ye", "wrapperRef", "pe", "ue", "_wrapperRef_current", "input", "handleChange", "event", "newText"]
}
