import{d as v,F as A}from"./vuedraggable.umd.3a6a20d0.js";import{d as y,r as V,K as x,o as C,eN as f,b as c,c as u,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.aedb9989.js";import{S as F}from"./SaveButton.bf4cb6b6.js";import{A as I}from"./Item.d0597777.js";import{A as L}from"./index.0d142fa6.js";import{A as w}from"./Title.a34b96de.js";import{A as k}from"./index.5834849d.js";import{A as b}from"./index.1c4f54f1.js";import{A as E,F as B}from"./Form.cfc41f21.js";import{S as N}from"./SidebarPreview.d309932c.js";import{C as U}from"./ContentLayout.de71297a.js";import{L as R}from"./LoadingContainer.8a18d4e5.js";import{a as T}from"./asyncComputed.710d44a6.js";import{W as $}from"./workspaces.2012f094.js";import"./envVars.4d445b18.js";import"./UnsavedChangesHandler.5204ecb7.js";import"./ExclamationCircleOutlined.1aa0b2ca.js";import"./Modal.6d96e682.js";import"./Base.1e4eebff.js";import"./Link.e5074027.js";import"./hasIn.468b611c.js";import"./PlayerNavbar.e383bf42.js";import"./PhKanban.vue.0df299af.js";import"./PhSignOut.vue.f941d6f3.js";import"./index.14ec62d3.js";import"./Text.b2be5925.js";import"./Home.6cf640f4.js";import"./api.a048edcc.js";import"./index.ad042616.js";import"./fetch.b0fc3d69.js";import"./pubsub.96a03d8f.js";import"./runnerData.64e03784.js";import"./url.c520dda4.js";import"./PhArrowSquareOut.vue.adfc0384.js";import"./index.dbcf7eec.js";import"./Paragraph.077143bd.js";import"./index.b7f77fb3.js";import"./Card.c2fe9d5e.js";import"./TabPane.1817b2c1.js";import"./WidgetsFrame.79c3abdb.js";import"./record.168f9da8.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]="7ce783fc-7678-4656-a2bc-0701c6a8615d",s._sentryDebugIdIdentifier="sentry-dbid-7ce783fc-7678-4656-a2bc-0701c6a8615d")}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)=>(c(),u(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)=>(c(),u(U,null,{default:o(()=>[e(p)||!e(a)?(c(),u(R,{key:0})):(c(),u(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.23dedf3e.js.map
