import{d as y,r as v,I as x,o as V,eM as u,b as c,c as f,w as o,f as t,u as e,aq as h,cD as A,e as r,eE as _,bz as D}from"./outputWidgets.225dd371.js";import{d as I}from"./vuedraggable.umd.082cb792.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.37c28cd7.js";import{a as C,A as E}from"./index.20d45070.js";import{A as w}from"./Title.bbb77099.js";import{A as g}from"./index.8e2737d3.js";import{A as b}from"./index.ceccdea3.js";import{A as F,F as L}from"./Form.12e2d16e.js";import{W as U}from"./workspaces.57178210.js";import{a as $}from"./asyncComputed.8a54909a.js";import"./envVars.fa2414d6.js";import{L as B}from"./CircularLoading.2b1bdb7d.js";import{S as M}from"./SidebarPreview.c28a6fa2.js";import"./ant-design.a00feaec.js";import"./index.86c302fc.js";import"./Modal.0a797886.js";import"./Text.a0f2d781.js";import"./Link.da1b7649.js";import"./hasIn.1e38e049.js";import"./runnerData.6fca8fdf.js";import"./url.29c1f37b.js";import"./record.b805ac15.js";import"./pubsub.3bce7ea8.js";import"./PlayerNavbar.3b70d609.js";import"./PhKanban.vue.4b1dfe9e.js";import"./index.82d7df3b.js";import"./repository.20c89e3d.js";import"./index.497bccda.js";import"./Paragraph.253f2b2e.js";import"./index.b8149c32.js";import"./WidgetsFrame.36ac6684.js";import"./HomeContent.076519a0.js";import"./PhArrowSquareOut.vue.32437cf7.js";import"./index.dd556745.js";import"./Card.ed89093a.js";import"./TabPane.3fb3cd2e.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]="5f5ef208-4dfd-4890-a9e9-99be23e7b30b",s._sentryDebugIdIdentifier="sentry-dbid-5f5ef208-4dfd-4890-a9e9-99be23e7b30b")}catch{}})();const N=r("span",null,"Route",-1),T=r("span",null,"Title",-1),j=r("span",null,"Visible",-1),q={style:{flex:"1 0"}},z={style:{flex:"1 0"}},R=y({__name:"SidebarEditor",props:{modelValue:{},workspace:{}},emits:["update:modelValue"],setup(s,{emit:a}){const p=s,i=v([]),n=()=>a("update:modelValue",i.value);return x(()=>p.modelValue,(d,m)=>{u.exports.isEqual(d,m)||(i.value=u.exports.cloneDeep(d))}),V(()=>{i.value=u.exports.cloneDeep(p.modelValue)}),(d,m)=>(c(),f(e(F),{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(E),{bordered:""},{header:o(()=>[t(e(A),{style:{width:"100%","justify-content":"space-between"}},{default:o(()=>[N,t(e(b),{type:"vertical"}),T,t(e(b),{type:"vertical"}),j]),_:1})]),default:o(()=>[t(e(I),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=l=>i.value=l),style:{width:"100%"},onChange:n},{item:o(({element:l})=>[t(e(C),{style:{cursor:"ns-resize"}},{default:o(()=>[r("span",q,"/"+_(l.path),1),r("span",z,_(l.name),1),t(e(D),{checked:l.visible,"onUpdate:checked":k=>l.visible=k,type:"checkbox",onChange:n},null,8,["checked","onUpdate:checked"])]),_:2},1024)]),_:1},8,["modelValue"])]),_:1})]),_:1}))}}),W={style:{width:"50%"}},P={style:{width:"50%"}},Ie=y({__name:"SidebarEditor",setup(s){const{result:a,loading:p}=$(()=>U.get());return(i,n)=>e(p)||!e(a)?(c(),f(B,{key:0})):(c(),f(e(L),{key:1,style:{width:"100%",padding:"40px 120px"}},{default:o(()=>[t(e(w),null,{default:o(()=>[h("Sidebar")]),_:1}),t(e(g),{gap:"40"},{default:o(()=>[r("div",W,[t(R,{modelValue:e(a).sidebar,"onUpdate:modelValue":n[0]||(n[0]=d=>e(a).sidebar=d),workspace:e(a)},null,8,["modelValue","workspace"])]),r("div",P,[t(M,{workspace:e(a),"widgets-visible":!1},null,8,["workspace"])])]),_:1})]),_:1}))}});export{Ie as default};
//# sourceMappingURL=SidebarEditor.69b0763d.js.map
