{"version":3,"file":"WithPhoneValidation.XaGyDyLj.mjs","names":[],"sources":["https:/framerusercontent.com/modules/S9m3FISS5sYtArAcj8kG/UgswnyPgeZykMtfMIdjT/WithPhoneValidation.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function withPhoneValidation(Component){return function Wrapped(props){useEffect(()=>{const phoneInput=document.querySelector(\"input[name='Telefon']\");if(!phoneInput)return;const validatePhone=()=>{const value=phoneInput.value.replace(/\\s+/g,\"\");const phonePattern=/^(\\+905\\d{9}|05\\d{9}|5\\d{9})$/;if(value===\"\"){phoneInput.setCustomValidity(\"\");}else if(!phonePattern.test(value)){phoneInput.setCustomValidity(\"L\\xfctfen ge\\xe7erli bir telefon numarası girin (\\xf6rn: 05xxxxxxxxx)\");}else{phoneInput.setCustomValidity(\"\");}};phoneInput.addEventListener(\"blur\",validatePhone);return()=>phoneInput.removeEventListener(\"blur\",validatePhone);},[]);return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withPhoneValidation\":{\"type\":\"reactHoc\",\"name\":\"withPhoneValidation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithPhoneValidation.map"],"mappings":"2JAAwE,SAAgB,EAAoB,EAAU,CAAC,OAAO,SAAiB,EAAM,CAA8jB,OAA7jB,MAAc,CAAC,IAAM,EAAW,SAAS,cAAc,wBAAwB,CAAC,GAAG,CAAC,EAAW,OAAO,IAAM,MAAkB,CAAC,IAAM,EAAM,EAAW,MAAM,QAAQ,OAAO,GAAG,CAAuD,IAAQ,IAA3C,gCAAuG,KAAK,EAAM,CAAnE,EAAW,kBAAkB,GAAG,CAAqC,EAAW,kBAAkB,+DAAwE,EAA6F,OAAlD,EAAW,iBAAiB,OAAO,EAAc,KAAW,EAAW,oBAAoB,OAAO,EAAc,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,mBAAttB,IAA6B"}