{"version":3,"file":"TagInterface.DbeCqB7G.mjs","names":["showIfSignedIn","buttonSignOut","showIfWithTag","showIfWithoutTag","withToggleBookmark","useUser","useBookmarks","useMemo"],"sources":["https:/framerusercontent.com/modules/2As9aNy3LHWxEIsvuu8C/63D9y97dw6mAfANmQtwA/FramerAuthV2.js","https:/framerusercontent.com/modules/dVqh5bDldXidNOhrFvis/3IHrlm4VEfnL72JMu7CB/TagInterface.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{createElement as _createElement}from\"react\";import{buttonSignOut,showIfSignedIn,showIfSignedOut,showIfWithTag,showIfWithoutTag,toggleVariant,toggleVariantIfWithTag,useUser,withBookmarks,withIsBookmarked,withToggleBookmark,useBookmarks}from\"https://cdn.jsdelivr.net/npm/@framerauth/sdk@2/dist/framerauth.mjs\";import{useMemo}from\"react\";/**\n * [START] FRAMERAUTH OVERRIDES\n *//* [START] AUTH */export function ShowIfSignedOut(Component){return showIfSignedOut(Component);}export function ShowIfSignedIn(Component){return showIfSignedIn(Component);}export function SignOut(Component){const redirectLink=\"/\";const options={redirectTo:redirectLink};return buttonSignOut(Component,options);}/* [END] AUTH *//* [START] BASICS */export function EmailAddress(Component){return props=>{const userStore=useUser();if(!userStore||!userStore.user)return null;const email=userStore.user.email;return /*#__PURE__*/_jsx(Component,{...props,text:email});};}export function Name(Component){return props=>{const userStore=useUser();if(!userStore||!userStore.user)return null;const name=userStore.user.name;return /*#__PURE__*/_jsx(Component,{...props,text:name});};}export function ShowIfWithTag(Component){return showIfWithTag(Component);}export function ShowIfWithoutTag(Component){return showIfWithoutTag(Component);}export function ToggleVariant(Component){return toggleVariant(Component);}export function ToggleVariantIfWithTag(Component){return toggleVariantIfWithTag(Component);}/* [END] BASICS *//* [START] MARK AS COMPLETE */export function CompleteLesson(Component){return withToggleBookmark(Component,\"completed\");}export function IsComplete(Component){return withIsBookmarked(Component,\"completed\");}/* [END] MARK AS COMPLETE *//* [START] BOOKMARKING */export function BookmarkList(Component){return withBookmarks(Component,\"saved-for-later\");}export function ShowIfBookmarked(Component){return withIsBookmarked(Component,\"saved-for-later\");}export function ToggleBookmark(Component){return withToggleBookmark(Component,\"saved-for-later\");}/* [END] BOOKMARKING */export function InputEmailAddress(Component){return props=>{const userStore=useUser();const email=userStore?.user?.email||\"\";return /*#__PURE__*/_createElement(Component,{...props,key:email,defaultValue:email});};}export function InputHiddenEmailAddress(Component){return props=>{const userStore=useUser();const email=userStore?.user?.email||\"\";return /*#__PURE__*/_createElement(Component,{...props,type:\"hidden\",key:email,defaultValue:email});};}/**\n * [END] FRAMERAUTH OVERRIDES\n */export function ToggleVariantIfCompleted(Component){return props=>{const{bookmarks}=useBookmarks();const key=useMemo(()=>{return`completed:${props?.slug}`;},[props]);const isSet=useMemo(()=>{if(!bookmarks){return false;}return key in bookmarks;},[bookmarks?.[key],key]);const variant=useMemo(()=>{return isSet?\"Completed\":undefined;},[isSet,props?.variant]);return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};}\nexport const __FramerMetadata__ = {\"exports\":{\"InputHiddenEmailAddress\":{\"type\":\"reactHoc\",\"name\":\"InputHiddenEmailAddress\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"IsComplete\":{\"type\":\"reactHoc\",\"name\":\"IsComplete\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Name\":{\"type\":\"reactHoc\",\"name\":\"Name\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"EmailAddress\":{\"type\":\"reactHoc\",\"name\":\"EmailAddress\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"InputEmailAddress\":{\"type\":\"reactHoc\",\"name\":\"InputEmailAddress\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfWithoutTag\":{\"type\":\"reactHoc\",\"name\":\"ShowIfWithoutTag\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"BookmarkList\":{\"type\":\"reactHoc\",\"name\":\"BookmarkList\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ToggleBookmark\":{\"type\":\"reactHoc\",\"name\":\"ToggleBookmark\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CompleteLesson\":{\"type\":\"reactHoc\",\"name\":\"CompleteLesson\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SignOut\":{\"type\":\"reactHoc\",\"name\":\"SignOut\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfSignedIn\":{\"type\":\"reactHoc\",\"name\":\"ShowIfSignedIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfSignedOut\":{\"type\":\"reactHoc\",\"name\":\"ShowIfSignedOut\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfWithTag\":{\"type\":\"reactHoc\",\"name\":\"ShowIfWithTag\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ToggleVariantIfWithTag\":{\"type\":\"reactHoc\",\"name\":\"ToggleVariantIfWithTag\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ToggleVariantIfCompleted\":{\"type\":\"reactHoc\",\"name\":\"ToggleVariantIfCompleted\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowIfBookmarked\":{\"type\":\"reactHoc\",\"name\":\"ShowIfBookmarked\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ToggleVariant\":{\"type\":\"reactHoc\",\"name\":\"ToggleVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FramerAuthV2.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * TagInterface.tsx\n *\n * @framerDisableUnlink\n *\n * Allows users to expose props within a component that can be used within a Framer code override\n * Also allows users to bind dynamic data like CMS fields to components/ overrides\n */export default function TagInterface(props){return /*#__PURE__*/_jsx(\"div\",{style:styles});}addPropertyControls(TagInterface,{tags:{title:\"Tags\",type:ControlType.String},require:{type:ControlType.Enum,defaultValue:\"any\",displaySegmentedControl:true,segmentedControlDirection:\"horizontal\",options:[\"any\",\"all\"],optionTitles:[\"Any\",\"All\"]}});const styles={};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TagInterface\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"*\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TagInterface.map"],"mappings":"2QAEmG,SAAgB,EAAe,EAAU,CAAC,OAAOA,EAAe,EAAU,CAAE,SAAgB,EAAQ,EAAU,CAAgE,OAAOC,EAAc,EAA/C,CAAC,WAAnB,IAA2C,CAAwC,CAA+c,SAAgB,EAAc,EAAU,CAAC,OAAOC,EAAc,EAAU,CAAE,SAAgB,EAAiB,EAAU,CAAC,OAAOC,EAAiB,EAAU,CAAwN,SAAgB,EAAe,EAAU,CAAC,OAAOC,EAAmB,EAAU,YAAY,CAAypB,SAAgB,EAAwB,EAAU,CAAC,MAAO,IAAO,CAA2B,IAAM,EAAhBC,GAAS,EAAwB,MAAM,OAAO,GAAG,OAAoB,EAAe,EAAU,CAAC,GAAG,EAAM,KAAK,SAAS,IAAI,EAAM,aAAa,EAAM,CAAC,EAE7kE,SAAgB,EAAyB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,aAAWC,GAAc,CAAO,EAAIC,MAAmB,aAAa,GAAO,OAAS,CAAC,EAAM,CAAC,CAAO,EAAMA,MAAiB,EAAgC,KAAO,EAArB,GAAiC,CAAC,IAAY,GAAK,EAAI,CAAC,CAAO,EAAQA,MAAoB,EAAM,YAAY,IAAA,GAAY,CAAC,EAAM,GAAO,QAAQ,CAAC,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAc,UAAQ,CAAC,mBAJ5X,IAAmD,IAAwQ,ICOnW,SAAwB,EAAa,EAAM,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,EAAO,CAAC,oBAPlD,IAAoD,CAOA,EAAoB,EAAa,CAAC,KAAK,CAAC,MAAM,OAAO,KAAK,EAAY,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAY,KAAK,aAAa,MAAM,wBAAwB,GAAK,0BAA0B,aAAa,QAAQ,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,CAAO,EAAO,EAAE"}