import{d as v,F as A}from"./vuedraggable.umd.98bc57eb.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.f4ff73cb.js";import{S as F}from"./SaveButton.8af46952.js";import{A as I}from"./Item.abc12559.js";import{A as L}from"./index.aec8f065.js";import{A as w}from"./Title.8356c432.js";import{A as k}from"./index.38a388d2.js";import{A as b}from"./index.cead1e00.js";import{A as E,F as B}from"./Form.c8ea7c3d.js";import{S as N}from"./SidebarPreview.65e51ac1.js";import{C as U}from"./ContentLayout.52723b88.js";import{L as R}from"./LoadingContainer.b1642792.js";import{a as T}from"./asyncComputed.1c2e733f.js";import{W as $}from"./workspaces.b1acd1b5.js";import"./envVars.092fda86.js";import"./UnsavedChangesHandler.b026b8c9.js";import"./ExclamationCircleOutlined.1bd1f180.js";import"./Modal.fb9d97fb.js";import"./Base.2cf6cca2.js";import"./Link.58a56401.js";import"./hasIn.c05f2ad3.js";import"./PlayerNavbar.f039b331.js";import"./PhKanban.vue.12e8939b.js";import"./PhSignOut.vue.21b85b35.js";import"./index.db4b3bef.js";import"./Text.b0ae0f80.js";import"./Home.45153c02.js";import"./api.47f2b83e.js";import"./index.d3c08eba.js";import"./fetch.94c8b741.js";import"./pubsub.f8e50115.js";import"./runnerData.f9578373.js";import"./url.f4aa4fed.js";import"./PhArrowSquareOut.vue.42aab9d1.js";import"./index.1893243b.js";import"./Paragraph.0762ff9a.js";import"./index.f5809359.js";import"./Card.c86b7818.js";import"./TabPane.12230f18.js";import"./WidgetsFrame.d26e64d1.js";import"./record.06ee4427.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]="8757a487-7993-4385-8d85-6c7aad97926b",s._sentryDebugIdIdentifier="sentry-dbid-8757a487-7993-4385-8d85-6c7aad97926b")}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 p=s,l=V([]),n=()=>a("update:modelValue",l.value);return x(()=>p.modelValue,(d,m)=>{f.exports.isEqual(d,m)||(l.value=f.exports.cloneDeep(d))}),C(()=>{l.value=f.exports.cloneDeep(p.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:n},{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:n},null,8,["checked","onUpdate:checked"])]),_:2},1024)]),_:1},8,["modelValue","force-fallback","item-key"])]),_:1})]),_:1}))}}),H={style:{width:"50%"}},O={style:{width:"50%"}},Ne=y({__name:"SidebarEditor",setup(s){const{result:a,loading:p}=T(()=>$.get());return(l,n)=>(u(),c(U,null,{default:o(()=>[e(p)||!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":n[0]||(n[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{Ne as default};
//# sourceMappingURL=SidebarEditor.aae6d5dc.js.map
