import{d as v,F as A}from"./vuedraggable.umd.f9fbdaf0.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.2c936b33.js";import{S as F}from"./SaveButton.69d06554.js";import{A as I}from"./Item.673d9e4d.js";import{A as L}from"./index.1f0537a0.js";import{A as w}from"./Title.6affb5db.js";import{A as k}from"./index.18754ce2.js";import{A as b}from"./index.c2c8103d.js";import{A as E,F as B}from"./Form.b5e24132.js";import{S as N}from"./SidebarPreview.9e69f240.js";import{C as U}from"./ContentLayout.ba6345c2.js";import{L as R}from"./LoadingContainer.e5fdc66f.js";import{a as T}from"./asyncComputed.b227690c.js";import{W as $}from"./workspaces.b564ff43.js";import"./envVars.70fcdfa2.js";import"./UnsavedChangesHandler.a4e024d1.js";import"./ExclamationCircleOutlined.3111c6c9.js";import"./Modal.17cdde78.js";import"./Base.7b44942c.js";import"./Link.bdb77d32.js";import"./hasIn.85b27717.js";import"./PlayerNavbar.088023c5.js";import"./PhKanban.vue.f514ae2e.js";import"./PhSignOut.vue.8c217588.js";import"./index.36699441.js";import"./Text.a2f30647.js";import"./Home.043666c6.js";import"./api.699355f9.js";import"./index.1a150dc1.js";import"./fetch.5fc14eb3.js";import"./pubsub.4c454988.js";import"./runnerData.02c403dc.js";import"./url.a282f1d5.js";import"./PhArrowSquareOut.vue.0e8f16db.js";import"./index.8bb82a9c.js";import"./Paragraph.51f31516.js";import"./index.a4c707aa.js";import"./Card.f5aa52bb.js";import"./TabPane.339a4539.js";import"./WidgetsFrame.f274e686.js";import"./record.210736c4.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]="913cbff4-49ed-4506-baf1-481159c4b6dd",s._sentryDebugIdIdentifier="sentry-dbid-913cbff4-49ed-4506-baf1-481159c4b6dd")}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,d=V([]),n=()=>a("update:modelValue",d.value);return x(()=>p.modelValue,(l,m)=>{f.exports.isEqual(l,m)||(d.value=f.exports.cloneDeep(l))}),C(()=>{d.value=f.exports.cloneDeep(p.modelValue)}),(l,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:l.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:d.value,"onUpdate:modelValue":m[0]||(m[0]=r=>d.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(d,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]=l=>e(a).sidebar=l),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.23368be1.js.map
