{"version":3,"file":"URLFormField.CitdILGm.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/viI2razNeMr8ohGu72SF/musZm1rZoJuniY4M0yHz/URLFormField.js"],"sourcesContent":["// Hidden form field component that reads value from URL parameter\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Hidden URL Parameter Form Field\n *\n * @framerIntrinsicWidth 5\n * @framerIntrinsicHeight 5\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function URLFormField(props){const{paramName,defaultValue,style}=props;const[value,setValue]=useState(defaultValue);useEffect(()=>{if(typeof window!==\"undefined\"){const params=new URLSearchParams(window.location.search);const paramValue=params.get(paramName);if(paramValue){startTransition(()=>setValue(paramValue));}else if(defaultValue){startTransition(()=>setValue(defaultValue));}}},[paramName,defaultValue]);return /*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:paramName,value:value,style:style});}addPropertyControls(URLFormField,{paramName:{type:ControlType.String,title:\"Param & Field Name\",defaultValue:\"email\",placeholder:\"e.g., email, name, phone\"},defaultValue:{type:ControlType.String,title:\"Default Value\",defaultValue:\"\",placeholder:\"Fallback value if param not found\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"URLFormField\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"5\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"5\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./URLFormField.map"],"mappings":"uMASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,YAAU,eAAa,SAAO,EAAW,CAAC,EAAM,GAAUA,EAAS,CAAY,EAA2S,OAAzS,MAAc,CAAC,GAAU,IAAS,OAAY,CAA0D,IAAM,EAAW,IAAzD,gBAAgB,EAAO,SAAS,MAA8B,CAAC,CAAC,IAAI,CAAS,EAAK,EAAY,MAAoB,EAAS,CAAU,CAAC,EAAW,GAAc,MAAoB,EAAS,CAAY,CAAC,CAAG,CAAC,EAAE,CAAC,EAAU,CAAY,CAAC,EAAsB,EAAK,QAAQ,CAAC,KAAK,SAAS,KAAK,EAAgB,QAAY,OAAK,CAAC,CAAE,qBAR9d,IAAsD,IAAoD,EAQqX,EAAoB,EAAa,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,qBAAqB,aAAa,QAAQ,YAAY,0BAA0B,EAAE,aAAa,CAAC,KAAK,EAAY,OAAO,MAAM,gBAAgB,aAAa,GAAG,YAAY,mCAAmC,CAAC,CAAC"}