import{r as i,h as t}from"./p-083180bf.js";import{n as r}from"./p-a7fc1e02.js";import{d as e,J as o,w as s,s as a,i as n}from"./p-d0993bb9.js";import{c}from"./p-c1086930.js";import{g as l}from"./p-9ec99ced.js";import"./p-cef45012.js";import{L as m}from"./p-1a3a57c0.js";const d=e.gql`
  query getUserDetails {
    viewer {
      ... on User {
        id
        accountId
        email
      }
    }
  }
`,h=class{constructor(t){i(this,t),this.userIdentificationText="{email}",this.switchUserText="not you?",this.emailErrorText="Error fetching email",r(this)}disconnectedCallback(){}render(){const i=n()?function(i){return c({onSwitchClick:()=>a(void 0),filledInEmailText:"john@example.com",switchUserText:i.switchUserText,emailErrorText:i.emailErrorText,loading:!1},i.demoData||{},{arrayMerge:(i,t)=>t})}(this):function(i){var t,r;const e=o(),{loading:n,data:c}=s(d,{},!e);return{loading:n,onSwitchClick:()=>{a(void 0)},filledInEmailText:null===(t=i.userIdentificationText)||void 0===t?void 0:t.replace("{email}",null===(r=null==c?void 0:c.viewer)||void 0===r?void 0:r.email),...i}}(l(this));return t(m,Object.assign({},i,{userIdentificationText:this.userIdentificationText,switchUserText:this.switchUserText,emailErrorText:this.emailErrorText}))}};export{h as sqm_logout_current_user}