"use strict";var P=Object.create;var a=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var b=Object.getPrototypeOf;var L=Object.prototype.hasOwnProperty;var c=(e,s)=>a(e,"name",{value:s,configurable:true});var N=(e,s)=>{for(var o in s)a(e,o,{get:s[o],enumerable:true})};var g=(e,s,o,r)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let t of R(s))if(!L.call(e,t)&&t!==o)a(e,t,{get:()=>s[t],enumerable:!(r=f(s,t))||r.enumerable})}return e};var d=(e,s,o)=>(o=e!=null?P(b(e)):{},g(s||!e||!e.__esModule?a(o,"default",{value:e,enumerable:true}):o,e));var k=e=>g(a({},"__esModule",{value:true}),e);var w=(e,s,o,r)=>{var t=r>1?void 0:r?f(s,o):s;for(var p=e.length-1,m;p>=0;p--)if(m=e[p])t=(r?m(s,o,t):m(t))||t;if(r&&t)a(s,o,t);return t};var I={};N(I,{default:()=>E});module.exports=k(I);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 A=window?.matchMedia("(prefers-reduced-motion: no-preference)")?"width 0.5s ease":"none";const C=c(e=>({wrapper:{display:"flex",alignItems:"flex-start",position:"absolute",transition:A,width:`calc(100% - ${e.workspaces.drawer.width}px)`,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:e.colorAppLoaderSpinner}}),"styles");let n=class extends y.Component{render(){const{classes:s,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)([s.wrapper]),children:(0,i.jsxs)("div",{className:s.component,children:[(0,i.jsx)(S.default,{className:s.spinner,color:T.DEFAULT_LOADER_COLOR}),(0,i.jsx)("p",{className:s.message,children:`${o.formatMessage(h.switchingTo)} ${p}`})]})})}};c(n,"WorkspaceSwitchingIndicator");n=w([x.observer],n);var E=(0,l.injectIntl)((0,v.default)(C,{injectTheme:true})(n));
