{"version":3,"file":"LinkWithQueryParam.DwHd7nmv.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/jMZzSc2nwRMT14xzskT1/n0kM5UpJOfgqjn5E21Sc/LinkWithQueryParam.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export function toLink(Component){return props=>{const[query,setQuery]=useState();useEffect(()=>{if(document){setQuery(document.location.search);}},[]);return /*#__PURE__*/_jsx(Component,{...props,link:`${props.link}${query}`});};}export function withMyCardLink(Component){return props=>{const[myCard,setMyCard]=useState();useEffect(()=>{if(document){const params=new URLSearchParams(window.location.search);const myCard=params.get(\"my-card\");setMyCard(myCard);}},[]);return /*#__PURE__*/_jsx(Component,{...props,link:`${props.link}/${myCard}`});};}/** \nexport function toHref(Component): ComponentType {\n    return (props) => {\n        const queryParams = document.location.search\n\n        return <Component {...props} href={`${props.href}${queryParams}`} />\n    }\n}\n*/\nexport const __FramerMetadata__ = {\"exports\":{\"toLink\":{\"type\":\"reactHoc\",\"name\":\"toLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMyCardLink\":{\"type\":\"reactHoc\",\"name\":\"withMyCardLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LinkWithQueryParam.map"],"mappings":"uIAAiF,SAAgB,EAAO,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAUA,GAAU,CAAuE,OAAtE,MAAc,CAAI,UAAU,EAAS,SAAS,SAAS,OAAO,EAAI,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAG,EAAM,OAAO,IAAQ,CAAC,EAAI,SAAgB,EAAe,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAO,GAAWA,GAAU,CAAkJ,OAAjJ,MAAc,CAAI,UAAsG,EAA/E,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAqB,IAAI,UAAU,CAAkB,EAAI,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAG,EAAM,KAAK,GAAG,IAAS,CAAC,uBAAvkB,IAAsC"}