(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{DRNK:function(e,t,n){"use strict";n.r(t),n.d(t,"SelectOrgPage",(function(){return l}));var a,i=n("q1tI"),c=n("ZGyg"),o=n("t8hP"),r=n("Y8YH"),s=n("kDLi"),d=n("nKUr");const g={main:{icon:"grafana",subTitle:"Preferences",text:"Select active organization"},node:{text:"Select active organization"}},l=()=>{const[e,t]=Object(i.useState)();return Object(r.a)(async()=>{t(await(async()=>await Object(o.getBackendSrv)().get("/api/user/orgs"))())},[]),Object(d.jsx)(c.b,{navModel:g,children:Object(d.jsx)(c.b.Contents,{children:Object(d.jsxs)("div",{children:[a||(a=Object(d.jsx)("p",{children:"You have been invited to another organization! Please select which organization that you want to use right now. You can change this later at any time."})),Object(d.jsx)(s.HorizontalGroup,{wrap:!0,children:e&&e.map(e=>Object(d.jsx)(s.Button,{icon:"signin",onClick:()=>(async e=>await Object(o.getBackendSrv)().post("/api/user/using/"+e.orgId).then(()=>{window.location.href=o.config.appSubUrl+"/"}))(e),children:e.name},e.orgId))})]})})})};t.default=l}}]);
//# sourceMappingURL=SelectOrgPage.4bfd7b0ee99616560b7a.js.map