import{d as v,F as A}from"./vuedraggable.umd.37940677.js";import{d as b,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.e32c4de9.js";import{S as F}from"./SaveButton.deca2dd0.js";import{a as I,A as L}from"./index.439e3466.js";import{A as w}from"./Title.e20804f9.js";import{A as k}from"./index.66b88b11.js";import{A as y}from"./index.bede6a4d.js";import{A as E,F as B}from"./Form.6e618181.js";import{S as N}from"./SidebarPreview.37e71aab.js";import{C as U}from"./ContentLayout.5912ffdb.js";import{L as R}from"./LoadingContainer.fbe73b71.js";import{a as T}from"./asyncComputed.cd8e83d5.js";import{W as $}from"./workspaces.75a5079a.js";import"./envVars.c5ba9658.js";import"./UnsavedChangesHandler.06f02c32.js";import"./ExclamationCircleOutlined.83940b4b.js";import"./Modal.3e62e331.js";import"./Base.583225bc.js";import"./Link.b760dec6.js";import"./hasIn.e17bd528.js";import"./PlayerNavbar.2ae60fe2.js";import"./PhKanban.vue.104dda3d.js";import"./PhSignOut.vue.27f1fe26.js";import"./index.335ba5c3.js";import"./Text.81365b40.js";import"./Home.0835d937.js";import"./api.804e2c24.js";import"./index.c3315fab.js";import"./fetch.c8ae2d51.js";import"./pubsub.574e50fa.js";import"./runnerData.9bc53e5d.js";import"./url.b82290c2.js";import"./PhArrowSquareOut.vue.4c039380.js";import"./index.6a52a1e2.js";import"./Paragraph.27861c63.js";import"./index.60b72636.js";import"./Card.729aeeb4.js";import"./TabPane.e82bc195.js";import"./WidgetsFrame.ae5146ea.js";import"./record.f085fb76.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]="2c5eec59-28aa-4655-9c24-62694a367d3f",s._sentryDebugIdIdentifier="sentry-dbid-2c5eec59-28aa-4655-9c24-62694a367d3f")}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=b({__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(y),{type:"vertical"}),K,t(e(y),{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=b({__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.bb397824.js.map
