{"version":3,"file":"Show_on_Login.C_QBhYl8.mjs","names":[],"sources":["https:/framerusercontent.com/modules/IavsLsGsmMaVseLCoHdt/CUucSIAS8m8a90ibMIWP/Show_on_Login.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{fetchUserData}from\"https://framer.com/m/ThentyHelpers-I0Oh.js\";import{thentyAuth}from\"https://cdn.thenty.io/beta/thenty-sdk.min.js\";export const withLogout=Component=>props=>/*#__PURE__*/_jsx(Component,{...props,onClick:()=>{thentyAuth.logout();}});export const showWhenLoggedIn=Component=>props=>{const{loggedIn}=fetchUserData();return!loggedIn?null:/*#__PURE__*/_jsx(Component,{...props});};export const hideWhenLoggedIn=Component=>props=>{const{loggedIn}=fetchUserData();return loggedIn?null:/*#__PURE__*/_jsx(Component,{...props});};export const withFirstName=Component=>props=>{var _userData_name;const{loggedIn,userData}=fetchUserData();var _userData_name_split_;return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:(_userData_name_split_=userData===null||userData===void 0?void 0:(_userData_name=userData.name)===null||_userData_name===void 0?void 0:_userData_name.split(\" \")[0])!==null&&_userData_name_split_!==void 0?_userData_name_split_:\"\"});};export const withFullName=Component=>props=>{const{loggedIn,userData}=fetchUserData();return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:userData===null||userData===void 0?void 0:userData.name});};export const withEmail=Component=>props=>{const{loggedIn,userData}=fetchUserData();return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:userData===null||userData===void 0?void 0:userData.email});};\nexport const __FramerMetadata__ = {\"exports\":{\"showWhenLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"showWhenLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmail\":{\"type\":\"reactHoc\",\"name\":\"withEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideWhenLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"hideWhenLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLogout\":{\"type\":\"reactHoc\",\"name\":\"withLogout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFirstName\":{\"type\":\"reactHoc\",\"name\":\"withFirstName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFullName\":{\"type\":\"reactHoc\",\"name\":\"withFullName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Show_on_Login.map"],"mappings":"gUAAghC,AAAhhC,GAA2C,IAAsE,IAAqE,CAAa,EAAW,GAAW,GAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,IAAI,CAAC,EAAW,QAAQ,AAAE,CAAC,EAAC,CAA8S,EAAc,GAAW,GAAO,CAAC,IAAI,EAAe,GAAK,CAAC,WAAS,WAAS,CAAC,GAAe,CAAC,IAAI,EAAsB,OAAO,IAAW,EAAS,KAAkB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,EAAsB,GAAW,SAA6B,GAAwE,CAArE,EAAe,EAAS,OAA4D,MAAM,IAAI,CAAC,KAAiE,EAAG,EAAC,AAAE,EAAc,EAAa,GAAW,GAAO,CAAC,GAAK,CAAC,WAAS,WAAS,CAAC,GAAe,CAAC,OAAO,IAAW,EAAS,KAAkB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAmD,IAAK,EAAC,AAAE"}