import{P as p}from"./PlayerNavbar.c204244e.js";import{d as u}from"./runnerData.f4774ebb.js";import{d,J as n,b as l,c as k,v as b,y as r,q as g,B as y,z as w,Y as f,Z as i,$ as h,p as _}from"./registerWidgets.04dc761e.js";function v(o){return o.startsWith("#")||o.match(/^(rgb|hsl)/)}function C(o){return o.startsWith("http://")||o.startsWith("https://")}function P(o){return C(o)?"external-image":v(o)?"color":"hosted-image"}function S(o,e="/_assets/background"){switch(P(o)){case"external-image":return{backgroundImage:`url(${o})`,backgroundSize:"cover",backgroundPosition:"center"};case"color":return{backgroundColor:o};case"hosted-image":return{backgroundImage:`url(${e})`,backgroundSize:"cover",backgroundPosition:"center"}}}const x={class:"sidebar-preview"},N=d({__name:"SidebarPreview",props:{workspace:null},setup(o){const e=o,s=n(()=>e.workspace.logoUrl?`/_editor/api/assets/${e.workspace.logoUrl}`:""),m=n(()=>(document.documentElement.style.setProperty("--ac-global-font-family",e.workspace.fontFamily),{"--color-main":e.workspace.mainColor,"--color-main-light":f(e.workspace.mainColor,.15),"--color-main-hover":i(e.workspace.mainColor),"--color-main-active":i(e.workspace.mainColor),"--color-secondary":"transparent","--color-secondary-lighter":"transparent","--color-secondary-darker":"transparent","--button-font-color-main":h(e.workspace.mainColor),"--font-family":e.workspace.fontFamily,...S(e.workspace.theme,`/_editor/api/assets/${e.workspace.theme}`)})),c=n(()=>{var a,t;return e.workspace?{id:"mockId",path:"mockPath",title:"mockTitle",theme:e.workspace.theme,brandName:(a=e.workspace.brandName)!=null?a:null,logoUrl:(t=e.workspace.logoUrl)!=null?t:null,mainColor:e.workspace.mainColor,fontFamily:e.workspace.fontFamily,layout:u({props:{},slot:{},version:"0.2"}),workspaceName:"Untitled Workspace",sidebar:e.workspace.sidebar,runtimeType:"dash"}:null});return(a,t)=>(l(),k("div",x,[b("div",{class:"sidebar-frame",style:w(r(m))},[r(c)?(l(),g(p,{key:0,runtime:r(c),"brand-name":o.workspace.brandName,"logo-url":r(s),"user-email":"user@email.com","force-responsivity":"desktop"},null,8,["runtime","brand-name","logo-url"])):y("",!0)],4)]))}});const F=_(N,[["__scopeId","data-v-e30b1a3b"]]);export{F as S,P as b};
//# sourceMappingURL=SidebarPreview.9b3197e9.js.map
