{"version":3,"file":"User_Name.CSFtqjCu.mjs","names":[],"sources":["https:/framerusercontent.com/modules/vqB4YcGSAp1YUxYvc2gI/DEY3R6Cal4BOXiZvRcal/User_Name.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=>{const{loggedIn,userData}=fetchUserData();return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:userData?.name?.split(\" \")[0]??\"\"});};export const withFullName=Component=>props=>{const{loggedIn,userData}=fetchUserData();return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:userData?.name});};export const withEmail=Component=>props=>{const{loggedIn,userData}=fetchUserData();return!loggedIn||!userData?null:/*#__PURE__*/_jsx(Component,{...props,text:userData?.email});};\nexport const __FramerMetadata__ = {\"exports\":{\"withFirstName\":{\"type\":\"reactHoc\",\"name\":\"withFirstName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWhenLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"showWhenLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmail\":{\"type\":\"reactHoc\",\"name\":\"withEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFullName\":{\"type\":\"reactHoc\",\"name\":\"withFullName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLogout\":{\"type\":\"reactHoc\",\"name\":\"withLogout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideWhenLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"hideWhenLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./User_Name.map"],"mappings":"4OAA2C,IAAsE,IAAqE,CAAkI,EAAiB,GAAW,GAAO,CAAC,GAAK,CAAC,YAAU,GAAe,CAAC,OAAO,EAA2B,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAA5C,MAA4D,EAAiB,GAAW,GAAO,CAAC,GAAK,CAAC,YAAU,GAAe,CAAC,OAAO,EAAS,KAAkB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,EAAgB,EAAc,GAAW,GAAO,CAAC,GAAK,CAAC,WAAS,YAAU,GAAe,CAAC,MAAM,CAAC,GAAU,CAAC,EAAS,KAAkB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAU,MAAM,MAAM,IAAI,CAAC,IAAI,GAAG,CAAC,EAAgB,EAAa,GAAW,GAAO,CAAC,GAAK,CAAC,WAAS,YAAU,GAAe,CAAC,MAAM,CAAC,GAAU,CAAC,EAAS,KAAkB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAU,KAAK,CAAC"}