import{d as y,r as g,I as k,o as v,eM as u,b as c,c as f,w as a,f as t,u as e,aq as x,cD as V,e as r,eE as _,bz as A}from"./outputWidgets.f017b1ba.js";import{d as D}from"./vuedraggable.umd.c790090d.js";import{_ as I}from"./SaveButton.vue_vue_type_script_setup_true_lang.75c3ecee.js";import{a as S,A as C}from"./index.af36d5bf.js";import{A as E}from"./Title.4002b692.js";import{A as h}from"./index.5cbbe314.js";import{A as b}from"./index.0deb07e4.js";import{A as F,F as L}from"./Form.c4ae4d63.js";import{W as U}from"./workspaces.aaea5068.js";import{a as $}from"./asyncComputed.9ec0ae7d.js";import"./envVars.952414d1.js";import{L as B}from"./CircularLoading.f397eb8b.js";import{S as M}from"./SidebarPreview.e92d6c7d.js";import"./ant-design.f8dd6064.js";import"./index.11845c93.js";import"./Modal.334f8812.js";import"./Typography.5dfc411f.js";import"./Link.d1ea88f0.js";import"./Base.bb2b5283.js";import"./hasIn.a2b4c2f9.js";import"./runnerData.69ad746c.js";import"./url.42b30a4e.js";import"./record.e2bcfa5f.js";import"./pubsub.4d72db7b.js";import"./PlayerNavbar.b323f789.js";import"./index.7f38f098.js";import"./repository.875b9f0a.js";import"./ArrowRightOutlined.08fa31dd.js";import"./WidgetsFrame.ba21a3b2.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="b60f3816-b152-4843-ad3b-a26022da7c90",s._sentryDebugIdIdentifier="sentry-dbid-b60f3816-b152-4843-ad3b-a26022da7c90")}catch{}})();const N=r("span",null,"Route",-1),T=r("span",null,"Title",-1),j=r("span",null,"Visible",-1),q={style:{flex:"1 0"}},z={style:{flex:"1 0"}},R=y({__name:"SidebarEditor",props:{modelValue:{},workspace:{}},emits:["update:modelValue"],setup(s,{emit:o}){const n=s,i=g([]),p=()=>o("update:modelValue",i.value);return k(()=>n.modelValue,(d,m)=>{u.exports.isEqual(d,m)||(i.value=u.exports.cloneDeep(d))}),v(()=>{i.value=u.exports.cloneDeep(n.modelValue)}),(d,m)=>(c(),f(e(F),{help:"Change your sidebar items position and visibility by dragging them up and down"},{default:a(()=>[t(e(h),{justify:"space-between",style:{margin:"0 0 12px 0"}},{default:a(()=>[t(e(E),{level:4,style:{margin:"0"}},{default:a(()=>[x("Sidebar items")]),_:1}),t(I,{model:d.workspace},null,8,["model"])]),_:1}),t(e(C),{bordered:""},{header:a(()=>[t(e(V),{style:{width:"100%","justify-content":"space-between"}},{default:a(()=>[N,t(e(b),{type:"vertical"}),T,t(e(b),{type:"vertical"}),j]),_:1})]),default:a(()=>[t(e(D),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=l=>i.value=l),style:{width:"100%"},onChange:p},{item:a(({element:l})=>[t(e(S),{style:{cursor:"ns-resize"}},{default:a(()=>[r("span",q,"/"+_(l.path),1),r("span",z,_(l.name),1),t(e(A),{checked:l.visible,"onUpdate:checked":w=>l.visible=w,type:"checkbox",onChange:p},null,8,["checked","onUpdate:checked"])]),_:2},1024)]),_:1},8,["modelValue"])]),_:1})]),_:1}))}}),W={style:{width:"50%"}},P={style:{width:"50%"}},ge=y({__name:"SidebarEditor",setup(s){const{result:o,loading:n}=$(()=>U.get());return(i,p)=>e(n)||!e(o)?(c(),f(B,{key:0})):(c(),f(e(L),{key:1,style:{width:"100%",padding:"40px 120px"}},{default:a(()=>[t(e(h),{gap:"40"},{default:a(()=>[r("div",W,[t(R,{modelValue:e(o).sidebar,"onUpdate:modelValue":p[0]||(p[0]=d=>e(o).sidebar=d),workspace:e(o)},null,8,["modelValue","workspace"])]),r("div",P,[t(M,{workspace:e(o),"widgets-visible":!1},null,8,["workspace"])])]),_:1})]),_:1}))}});export{ge as default};
//# sourceMappingURL=SidebarEditor.27d4284a.js.map
