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-9e5271eb.js";import{K as e}from"./p-8d2ddf16.js";import{i as p}from"./p-18da5f14.js";import{C as a}from"./p-10cfccbb.js";import{A as d}from"./p-25d382ec.js";import{p as n}from"./p-dd7dee94.js";import{l as h}from"./p-fc0dbea3.js";import"./p-6e24c7a4.js";import"./p-3968aca6.js";import"./p-105f7627.js";import"./p-d343a062.js";import"./p-814af281.js";class c{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 m=(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))),l=class{constructor(s){t(this,s),this.theme=h}componentWillLoad(){var t;"dark"==(t=t=>this.theme="dark"===t?r:h,window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(s=>{t(s.matches?"dark":"light")})),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")&&(this.theme=r)}render(){const{theme:t}=this,i={Authorization:(new a).getAll().jwt?`Bearer ${(new a).getAll().jwt}`:void 0},r=new e(`${n.kimlik}/${n.base}`,i),d=new o(`${n.data}/${n.base}`,i),h=new c(n.devingen,i);return p()?m(t,s("devingen-router",{apiKimlik:r,apiDevingen:h,apiData:d})):m(t,s("devingen-login-page",{apiKimlik:r}))}};export{l as devingen_root}