{"version":3,"file":"HardRedirect.BerrmTuJ.mjs","names":[],"sources":["https:/framerusercontent.com/modules/trR1cc5DD4O8VcklILLu/eOkcQxHmqfT9qCI1KfW8/HardRedirect.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";export function withHardRedirect(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const redirectionLink=props.link;const origin=window.location.origin??\"https://programiz.pro\";const hardLink=`${origin}${redirectionLink}`;return /*#__PURE__*/_jsx(Component,{ref:ref,...props,link:hardLink,onClick:()=>{window.location.href=hardLink;}});});}export function withCourseLink(Component){return({...props})=>{// Get the slug from the current page URL\n// Framer CMS pages are at /courses/:slug\nconst slug=window.location.pathname.split(\"/\").pop();const handleClick=()=>{window.location.href=`https://app.programiz.pro/check-course-enroll/${slug}`;};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHardRedirect\":{\"type\":\"reactHoc\",\"name\":\"withHardRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCourseLink\":{\"type\":\"reactHoc\",\"name\":\"withCourseLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HardRedirect.map"],"mappings":"gIAAyE,SAAgB,EAAiB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAgB,EAAM,KAAwE,EAAS,GAA/D,EAAO,SAAS,QAAQ,0BAAmD,IAAkB,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,KAAK,EAAS,YAAY,CAAC,EAAO,SAAS,KAAK,GAAW,CAAC,EAAG,CAAE,SAAgB,EAAe,EAAU,CAAC,OAAO,CAAC,GAAG,KAAS,CAEje,IAAM,EAAK,EAAO,SAAS,SAAS,MAAM,IAAI,CAAC,KAAK,CAAO,MAAgB,CAAC,EAAO,SAAS,KAAK,iDAAiD,KAAS,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAY,CAAC,uBAFlL,IAA8B"}