import{r as registerInstance,h,H as Host}from"./index-102043e0.js";import{D as DataApiImpl}from"./dataApi-8221972c.js";import{A as APIBase,K as KimlikApiImpl}from"./kimlikApi-ac700c81.js";import{i as isUserLoggedIn}from"./index-ef2fbee6.js";import{C as CookieStorage}from"./cookie-647f9dc7.js";import{p as prod}from"./services-fc4ce8f3.js";import"./data-transfer-field-918730a3.js";import"./BaseField-461b6d0c.js";import"./filter-cbaa3d7d.js";import"./_commonjsHelpers-27f122dd.js";var DevingenApi=function(){function e(e,r){var t=this;if(r===void 0){r={}}this.createWorkspace=function(e){return t.api.post("workspaces",{name:e})};this.getWorkspaceOwnerships=function(){return t.api.get("workspace-ownerships")};this.createProduct=function(e,r,i){return t.api.post("products",{name:e,workspaceId:r,type:i})};this.getProducts=function(){return t.api.get("products")};this.getProduct=function(e){return t.api.get("products/"+e)};this.api=new APIBase(e,r)}return e}();var wrapContent=function(e){return h(Host,null,h("dvn-theme-provider",{colorBackground:true,fitHeight:true},h("dvn-global-table",null),h("dvn-global-grid",null),h("dvn-global-text",null),h("notifier-wrapper",null,e)))};var DevingenRoot=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){var e=(new CookieStorage).getAll().jwt;var r={Authorization:e?"Bearer "+(new CookieStorage).getAll().jwt:undefined};var t=new KimlikApiImpl(prod.kimlik+"/"+prod.base,r);var i=new DataApiImpl(prod.data+"/"+prod.base,r);var n=new DevingenApi(prod.devingen+"/"+prod.base,r);if(!isUserLoggedIn()){return wrapContent(h("devingen-login-page",{apiKimlik:t}))}return wrapContent(h("devingen-router",{apiKimlik:t,apiDevingen:n,apiData:i}))};return e}();export{DevingenRoot as devingen_root};