{"version":3,"file":"Name.BnthyKBH.mjs","names":[],"sources":["https:/framerusercontent.com/modules/UkG5I7itfSV1jsfutt68/0fuYr7JqywV2Gj7DCcUe/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:`Ey buenas ${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\":{\"showWhenLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"showWhenLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFullName\":{\"type\":\"reactHoc\",\"name\":\"withFullName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideWhenLoggedIn\":{\"type\":\"reactHoc\",\"name\":\"hideWhenLoggedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmail\":{\"type\":\"reactHoc\",\"name\":\"withEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLogout\":{\"type\":\"reactHoc\",\"name\":\"withLogout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFirstName\":{\"type\":\"reactHoc\",\"name\":\"withFirstName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Name.map"],"mappings":"sOAA2C,IAAsE,IAAqE,CAA0mB,EAAa,GAAW,GAAO,CAAC,GAAK,CAAC,WAAS,YAAU,GAAe,CAAC,MAAM,CAAC,GAAU,CAAC,EAAS,KAAkB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,aAAa,GAAU,OAAO,CAAC"}