import{r as t,h as s,H as i}from"./p-9f21f85f.js";import{d as r}from"./p-156fcba4.js";import{D as o}from"./p-fb51892f.js";import{K as p}from"./p-03b520ca.js";import{i as e}from"./p-a1d8623c.js";import{C as a}from"./p-84876749.js";import{A as d}from"./p-e78d5616.js";import{p as n}from"./p-d1fe7ec4.js";import{l as h}from"./p-fc0dbea3.js";import{w as c}from"./p-4e31daae.js";import"./p-6e24c7a4.js";import"./p-3968aca6.js";import"./p-105f7627.js";import"./p-d343a062.js";import"./p-814af281.js";class m{constructor(t,s={}){this.createProduct=t=>this.api.post("products",t),this.getProducts=(t={})=>this.api.get("products",t),this.getProduct=t=>this.api.get(`products/${t}`),this.updateProduct=(t,s)=>this.api.put(`products/${t}`,s),this.deleteProduct=t=>this.api.delete(`products/${t}`),this.createWorkspace=t=>this.api.post("workspaces",{name:t}),this.updateWorkspace=(t,s)=>this.api.put(`workspaces/${t}`,s),this.deleteWorkspace=t=>this.api.delete(`workspaces/${t}`),this.getWorkspaceOwnerships=()=>this.api.get("workspace-ownerships"),this.createProductSettingsKimlik=(t,s,i,r)=>this.api.post("product-settings-kimlik",{product:{_id:t},databaseProduct:{_id:s},webhookAddress:i,headers:r}),this.findProductSettingsKimlik=t=>this.api.get("product-settings-kimlik",{productId:t}),this.createProductSettingsTaban=t=>this.api.post("product-settings-taban",{product:{_id:t}}),this.findProductSettingsTaban=t=>this.api.get("product-settings-taban",{productId:t}),this.api=new d(t,s)}}const l=(t,r)=>s(i,null,s("dvn-theme-provider",{theme:t,colorBackground:!0,fitHeight:!0},s("dvn-global-table",null),s("dvn-global-grid",null),s("dvn-global-text",null),s("notifier-wrapper",null,r))),u=class{constructor(s){t(this,s),this.theme=h}componentWillLoad(){"dark"===c((t=>this.theme="dark"===t?r:h))&&(this.theme=r)}render(){const{theme:t}=this,i={Authorization:(new a).getAll().jwt?`Bearer ${(new a).getAll().jwt}`:void 0},r=new p(`${n.kimlik}/${n.base}`,i),d=new o(`${n.data}/${n.base}`,i),h=new m(n.devingen,i);return e()?l(t,s("devingen-router",{apiKimlik:r,apiDevingen:h,apiData:d})):l(t,s("devingen-login-page",{apiKimlik:r}))}};export{u as devingen_root}