import{d as b,r as v,J as V,o as x,eN as f,b as u,c,w as o,f as t,u as e,ar as h,cB as A,e as s,eG as _,bz as C}from"./outputWidgets.be3472c2.js";import{d as D}from"./vuedraggable.umd.013cda09.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.37d6810a.js";import{A as I}from"./Item.e37372b2.js";import{A as L}from"./index.7eedf386.js";import{A as w}from"./Title.65752aa0.js";import{A as g}from"./index.ba676107.js";import{A as y}from"./index.557c5800.js";import{A as B,F as E}from"./Form.254a7379.js";import{S as F}from"./SidebarPreview.936c35bb.js";import{C as N}from"./ContentLayout.8a64aff0.js";import{L as U}from"./LoadingContainer.83bf440d.js";import{a as $}from"./asyncComputed.a619212b.js";import{W as T}from"./workspaces.7dc978fb.js";import"./envVars.3bfc7529.js";import"./UnsavedChangesHandler.080c92ef.js";import"./ExclamationCircleOutlined.85892480.js";import"./Modal.304207b8.js";import"./Text.c9febe27.js";import"./Link.bbb85664.js";import"./hasIn.bddd0a1a.js";import"./PlayerNavbar.f9ccf92b.js";import"./PhKanban.vue.61eb6c5c.js";import"./PhSignOut.vue.ca4a6d5d.js";import"./index.4d45a574.js";import"./Paragraph.7601abde.js";import"./index.ec79aad2.js";import"./WidgetsFrame.93ee4bfa.js";import"./runnerData.c8a20a02.js";import"./url.7fe1be7b.js";import"./HomeContent.f12da4f6.js";import"./PhArrowSquareOut.vue.03d709e6.js";import"./index.040ecb89.js";import"./Card.1ee02828.js";import"./TabPane.3d3ce947.js";import"./record.820df198.js";import"./pubsub.1063a0da.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="37a22cc5-72fd-4556-a410-676167553169",r._sentryDebugIdIdentifier="sentry-dbid-37a22cc5-72fd-4556-a410-676167553169")}catch{}})();const j=s("span",null,"Route",-1),z=s("span",null,"Title",-1),M=s("span",null,"Visible",-1),R={style:{flex:"1 0"}},W={style:{flex:"1 0"}},q=b({__name:"SidebarEditor",props:{modelValue:{},workspace:{}},emits:["update:modelValue"],setup(r,{emit:a}){const n=r,i=v([]),p=()=>a("update:modelValue",i.value);return V(()=>n.modelValue,(d,m)=>{f.exports.isEqual(d,m)||(i.value=f.exports.cloneDeep(d))}),x(()=>{i.value=f.exports.cloneDeep(n.modelValue)}),(d,m)=>(u(),c(e(B),{help:"Change your sidebar items position and visibility by dragging them up and down"},{default:o(()=>[t(e(g),{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(S,{model:d.workspace},null,8,["model"])]),_:1}),t(e(L),{bordered:""},{header:o(()=>[t(e(A),{style:{width:"100%","justify-content":"space-between"}},{default:o(()=>[j,t(e(y),{type:"vertical"}),z,t(e(y),{type:"vertical"}),M]),_:1})]),default:o(()=>[t(e(D),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=l=>i.value=l),style:{width:"100%"},onChange:p},{item:o(({element:l})=>[t(e(I),{style:{cursor:"ns-resize"}},{default:o(()=>[s("span",R,"/"+_(l.path),1),s("span",W,_(l.name),1),t(e(C),{checked:l.visible,"onUpdate:checked":k=>l.visible=k,type:"checkbox",onChange:p},null,8,["checked","onUpdate:checked"])]),_:2},1024)]),_:1},8,["modelValue"])]),_:1})]),_:1}))}}),G={style:{width:"50%"}},J={style:{width:"50%"}},Ie=b({__name:"SidebarEditor",setup(r){const{result:a,loading:n}=$(()=>T.get());return(i,p)=>(u(),c(N,null,{default:o(()=>[e(n)||!e(a)?(u(),c(U,{key:0})):(u(),c(e(E),{key:1,style:{width:"100%"}},{default:o(()=>[t(e(w),null,{default:o(()=>[h("Sidebar")]),_:1}),t(e(g),{gap:"40"},{default:o(()=>[s("div",G,[t(q,{modelValue:e(a).sidebar,"onUpdate:modelValue":p[0]||(p[0]=d=>e(a).sidebar=d),workspace:e(a)},null,8,["modelValue","workspace"])]),s("div",J,[t(F,{workspace:e(a),"widgets-visible":!1},null,8,["workspace"])])]),_:1})]),_:1}))]),_:1}))}});export{Ie as default};
//# sourceMappingURL=SidebarEditor.00b21786.js.map
