{"version":3,"file":"PersonalizeName.CUqeZCwt.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/W3SXxQ853AqjIpfhQwA6/3iCaAIDPV5SRcxPFTY2h/PersonalizeName.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function withFirstName(Component){return props=>{// Wir starten mit dem Standard-Text (noch kein Name)\nconst[name,setName]=useState(null);// useEffect läuft NUR im Browser, nicht auf dem Server\nuseEffect(()=>{// Jetzt ist window sicher verfügbar\nconst urlParams=new URLSearchParams(window.location.search);const firstName=urlParams.get(\"payer_first_name\");// Wenn ein Name da ist, speichern wir ihn\nif(firstName){setName(firstName);}},[]);// Wenn wir einen Namen haben, bauen wir den Satz, sonst nehmen wir den Originaltext aus Framer\nconst text=name?`Danke, ${name}!`:props.text;return /*#__PURE__*/_jsx(Component,{...props,text:text});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withFirstName\":{\"type\":\"reactHoc\",\"name\":\"withFirstName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PersonalizeName.map"],"mappings":"uIAAiF,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CACxI,GAAK,CAAC,EAAK,GAASA,EAAS,KAAK,CAClC,MAAc,CAC8C,IAAM,EAAlD,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAA2B,IAAI,mBAAmB,CAC1G,GAAW,EAAQ,EAAU,EAAI,EAAE,CAAC,CACvC,IAAM,EAAK,EAAK,UAAU,EAAK,GAAG,EAAM,KAAK,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAW,OAAK,CAAC,uBAL1D,IAAsC"}