{"version":3,"file":"URLFormField.P3HQL8_0.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":"kMASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,YAAU,eAAa,SAAO,EAAW,CAAC,EAAM,GAAUA,EAAS,EAAa,CAA0S,OAAzS,MAAc,CAAC,GAAU,IAAS,OAAY,CAA0D,IAAM,EAAlD,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAyB,IAAI,EAAU,CAAI,EAAY,MAAoB,EAAS,EAAW,CAAC,CAAU,GAAc,MAAoB,EAAS,EAAa,CAAC,GAAK,CAAC,EAAU,EAAa,CAAC,CAAqB,EAAK,QAAQ,CAAC,KAAK,SAAS,KAAK,EAAgB,QAAY,QAAM,CAAC,sBAR5d,IAAsD,IAAoD,CAQoX,EAAoB,EAAa,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,qBAAqB,aAAa,QAAQ,YAAY,2BAA2B,CAAC,aAAa,CAAC,KAAK,EAAY,OAAO,MAAM,gBAAgB,aAAa,GAAG,YAAY,oCAAoC,CAAC,CAAC"}