{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/S9nnUOhZS575Kt2ac63u/Hd3UZkyAr8eUu3v9ywHb/LogOutButton.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,Link}from\"framer\";import{useRef}from\"react\";import{StandardButton,standardButtonPropertyControls}from\"https://framerusercontent.com/modules/diyk5889JEo4mM5y5sJr/WO0BY8LwVoqggEJBPHWk/ThentyShared.js\";import{thentyAuth}from\"https://cdn.thenty.io/beta/thenty-sdk.min.js\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 300\n * @framerDisableUnlink\n */export default function LogOutButton(props){const{text,redirectLink,redirectDelay}=props;const ref=useRef(null);const redirectLinkRef=useRef(null);const onClick=()=>{localStorage.removeItem(thentyAuth.fetchAuthorizationKey());if(redirectLink&&redirectLinkRef.current){if(redirectDelay>0){setTimeout(()=>{redirectLinkRef.current.click();},redirectDelay*1e3);}else{redirectLinkRef.current.click();}}else if(!window.location.origin.endsWith(\".framercanvas.com\")){window.location.reload();}};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(StandardButton,{ref:ref,...props,onClick:onClick,children:text}),redirectLink&&/*#__PURE__*/_jsx(Link,{ref:redirectLinkRef,href:redirectLink,openInNewTab:false,smoothScroll:false,children:/*#__PURE__*/_jsx(\"a\",{style:{display:\"none\"}})})]});}LogOutButton.displayName=\"Log Out Button\";addPropertyControls(LogOutButton,{text:{type:ControlType.String,placeholder:\"Button Text\",defaultValue:\"Log Out\"},redirectLink:{type:ControlType.Link,title:\"Redirect\"},redirectDelay:{type:ControlType.Number,defaultValue:0,min:0,step:.1,displayStepper:true,title:\"Delay\"},...standardButtonPropertyControls({})});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LogOutButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutHeight\":\"any\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "sNAKkB,SAARA,EAA8BC,EAAM,CAAC,GAAK,CAAC,KAAAC,EAAK,aAAAC,EAAa,cAAAC,CAAa,EAAEH,EAAYI,EAAIC,EAAO,IAAI,EAAQC,EAAgBD,EAAO,IAAI,EAAuV,OAAoB,EAAME,EAAU,CAAC,SAAS,CAAcC,EAAKC,EAAe,CAAC,IAAIL,EAAI,GAAGJ,EAAM,QAAza,IAAI,CAAC,aAAa,WAAWU,EAAW,sBAAsB,CAAC,EAAKR,GAAcI,EAAgB,QAAYH,EAAc,EAAG,WAAW,IAAI,CAACG,EAAgB,QAAQ,MAAM,CAAE,EAAEH,EAAc,GAAG,EAAQG,EAAgB,QAAQ,MAAM,EAAaK,EAAO,SAAS,OAAO,SAAS,mBAAmB,GAAGA,EAAO,SAAS,OAAO,CAAG,EAAoH,SAASV,CAAI,CAAC,EAAEC,GAA2BM,EAAKI,EAAK,CAAC,IAAIN,EAAgB,KAAKJ,EAAa,aAAa,GAAM,aAAa,GAAM,SAAsBM,EAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAACT,EAAa,YAAY,iBAAiBc,EAAoBd,EAAa,CAAC,KAAK,CAAC,KAAKe,EAAY,OAAO,YAAY,cAAc,aAAa,SAAS,EAAE,aAAa,CAAC,KAAKA,EAAY,KAAK,MAAM,UAAU,EAAE,cAAc,CAAC,KAAKA,EAAY,OAAO,aAAa,EAAE,IAAI,EAAE,KAAK,GAAG,eAAe,GAAK,MAAM,OAAO,EAAE,GAAGC,EAA+B,CAAC,CAAC,CAAC,CAAC",
  "names": ["LogOutButton", "props", "text", "redirectLink", "redirectDelay", "ref", "pe", "redirectLinkRef", "l", "p", "StandardButton", "thentyAuth", "window", "Link", "addPropertyControls", "ControlType", "standardButtonPropertyControls"]
}
