"use strict";var P=Object.create;var n=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var b=Object.getPrototypeOf;var L=Object.prototype.hasOwnProperty;var c=(s,e)=>n(s,"name",{value:e,configurable:true});var N=(s,e)=>{for(var o in e)n(s,o,{get:e[o],enumerable:true})};var g=(s,e,o,r)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let t of R(e))if(!L.call(s,t)&&t!==o)n(s,t,{get:()=>e[t],enumerable:!(r=f(e,t))||r.enumerable})}return s};var d=(s,e,o)=>(o=s!=null?P(b(s)):{},g(e||!s||!s.__esModule?n(o,"default",{value:s,enumerable:true}):o,s));var A=s=>g(n({},"__esModule",{value:true}),s);var w=(s,e,o,r)=>{var t=r>1?void 0:r?f(e,o):e;for(var p=s.length-1,m;p>=0;p--)if(m=s[p])t=(r?m(e,o,t):m(t))||t;if(r&&t)n(e,o,t);return t};var k={};N(k,{default:()=>I});module.exports=A(k);var i=require("react/jsx-runtime");var u=d(require("classnames"));var x=require("mobx-react");var y=require("react");var l=require("react-intl");var v=d(require("react-jss"));var S=d(require("../../../components/ui/loader"));var T=require("../../../config");var M=require("../index");const h=(0,l.defineMessages)({switchingTo:{id:"workspaces.switchingIndicator.switchingTo",defaultMessage:"Switching to"},allServices:{id:"workspaces.switchingIndicator.allServices",defaultMessage:"All services"}});const C=window?.matchMedia("(prefers-reduced-motion: no-preference)")?"width 0.5s ease":"none";const E=c(s=>({wrapper:{display:"flex",alignItems:"flex-start",position:"absolute",transition:C,width:"100%",marginTop:"20px"},component:{background:"rgba(20, 20, 20, 0.4)",padding:"10px 20px",display:"flex",width:"auto",height:"auto",margin:[0,"auto"],borderRadius:6,alignItems:"center",zIndex:200},spinner:{marginRight:10},message:{fontSize:16,whiteSpace:"nowrap",color:s.colorAppLoaderSpinner}}),"styles");let a=class extends y.Component{render(){const{classes:e,intl:o}=this.props;const{isSwitchingWorkspace:r,nextWorkspace:t}=M.workspaceStore;if(!r){return null}const p=t?t.name:o.formatMessage(h.allServices);return(0,i.jsx)("div",{className:(0,u.default)([e.wrapper]),children:(0,i.jsxs)("div",{className:e.component,children:[(0,i.jsx)(S.default,{className:e.spinner,color:T.DEFAULT_LOADER_COLOR}),(0,i.jsx)("p",{className:e.message,children:`${o.formatMessage(h.switchingTo)} ${p}`})]})})}};c(a,"WorkspaceSwitchingIndicator");a=w([x.observer],a);var I=(0,l.injectIntl)((0,v.default)(E,{injectTheme:true})(a));
