import{d as v,F as A}from"./vuedraggable.umd.7826bea0.js";import{d as y,r as V,K as x,o as C,eN as f,b as u,c,w as o,f as t,u as e,as as h,cE as S,e as i,eH as _,bA as D}from"./outputWidgets.eb68177a.js";import{S as F}from"./SaveButton.a552208f.js";import{a as I,A as L}from"./index.150cc707.js";import{A as w}from"./Title.59fcdfbb.js";import{A as k}from"./index.c8945831.js";import{A as b}from"./index.59450a6f.js";import{A as E,F as B}from"./Form.80a7df3d.js";import{S as N}from"./SidebarPreview.9b93715b.js";import{C as U}from"./ContentLayout.aa451779.js";import{L as R}from"./LoadingContainer.552ffefd.js";import{a as T}from"./asyncComputed.d7d35a9b.js";import{W as $}from"./workspaces.1a10243d.js";import"./envVars.0fe08482.js";import"./UnsavedChangesHandler.a63b4f74.js";import"./ExclamationCircleOutlined.3792b97e.js";import"./Modal.92968fec.js";import"./Base.20dd2a14.js";import"./Link.59e40dde.js";import"./hasIn.5508971f.js";import"./PlayerNavbar.ce7c7f1a.js";import"./PhKanban.vue.09e25d1a.js";import"./PhSignOut.vue.086183d9.js";import"./index.ad250c43.js";import"./Text.accbe772.js";import"./Home.d521aeec.js";import"./api.81454d28.js";import"./index.5efb03fa.js";import"./fetch.48bfa89a.js";import"./pubsub.bf42621d.js";import"./runnerData.fcb41115.js";import"./url.1bbc2ec6.js";import"./PhArrowSquareOut.vue.3874f694.js";import"./index.bb8858c2.js";import"./Paragraph.fd20e99e.js";import"./index.1579fc05.js";import"./Card.c49c4ced.js";import"./TabPane.cc10803f.js";import"./WidgetsFrame.f4d94fb2.js";import"./record.0fb02764.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="070c9daf-837b-4343-8647-612013938ede",s._sentryDebugIdIdentifier="sentry-dbid-070c9daf-837b-4343-8647-612013938ede")}catch{}})();const j=i("span",null,"Route",-1),K=i("span",null,"Title",-1),M=i("span",null,"Visible",-1),W={style:{flex:"1 0"}},q={style:{flex:"1 0"}},z=y({__name:"SidebarEditor",props:{modelValue:{},workspace:{}},emits:["update:modelValue"],setup(s,{emit:a}){const n=s,l=V([]),p=()=>a("update:modelValue",l.value);return x(()=>n.modelValue,(d,m)=>{f.exports.isEqual(d,m)||(l.value=f.exports.cloneDeep(d))}),C(()=>{l.value=f.exports.cloneDeep(n.modelValue)}),(d,m)=>(u(),c(e(E),{help:"Change your sidebar items position and visibility by dragging them up and down"},{default:o(()=>[t(e(k),{justify:"space-between",style:{margin:"0 0 12px 0"}},{default:o(()=>[t(e(w),{level:4,style:{margin:"0"}},{default:o(()=>[h("Sidebar items")]),_:1}),t(F,{model:d.workspace},null,8,["model"])]),_:1}),t(e(L),{bordered:""},{header:o(()=>[t(e(S),{style:{width:"100%","justify-content":"space-between"}},{default:o(()=>[j,t(e(b),{type:"vertical"}),K,t(e(b),{type:"vertical"}),M]),_:1})]),default:o(()=>[t(e(v),{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=r=>l.value=r),"force-fallback":e(A),style:{width:"100%"},"item-key":r=>r.path,onChange:p},{item:o(({element:r})=>[t(e(I),{style:{cursor:"ns-resize"}},{default:o(()=>[i("span",W,"/"+_(r.path),1),i("span",q,_(r.name),1),t(e(D),{checked:r.visible,"onUpdate:checked":g=>r.visible=g,type:"checkbox",onChange:p},null,8,["checked","onUpdate:checked"])]),_:2},1024)]),_:1},8,["modelValue","force-fallback","item-key"])]),_:1})]),_:1}))}}),H={style:{width:"50%"}},O={style:{width:"50%"}},Be=y({__name:"SidebarEditor",setup(s){const{result:a,loading:n}=T(()=>$.get());return(l,p)=>(u(),c(U,null,{default:o(()=>[e(n)||!e(a)?(u(),c(R,{key:0})):(u(),c(e(B),{key:1,style:{width:"100%"}},{default:o(()=>[t(e(w),null,{default:o(()=>[h("Sidebar")]),_:1}),t(e(k),{gap:"40"},{default:o(()=>[i("div",H,[t(z,{modelValue:e(a).sidebar,"onUpdate:modelValue":p[0]||(p[0]=d=>e(a).sidebar=d),workspace:e(a)},null,8,["modelValue","workspace"])]),i("div",O,[t(N,{workspace:e(a),"widgets-visible":!1},null,8,["workspace"])])]),_:1})]),_:1}))]),_:1}))}});export{Be as default};
//# sourceMappingURL=SidebarEditor.55455254.js.map
