import{a as p,a4 as $,i as s,M as y,_ as D,w as H,u as T,h as R,n as E}from"./app-JmgyQoR0.js";import{_ as A}from"./radios.vue_vue_type_style_index_0_lang-1Sn__6GZ.js";import{F as B}from"./slot-skomV0Er.js";import{M as F}from"./MkContainer-6laePfDX.js";import{n as u}from"./navbar-9K90wpPh.js";import{b as N,a as L,c as v,w as P,h as x,t as w,l as m,j as n,K as c,E as l,z as a,x as _,u as o,H as j,d as z}from"./vue-y3KLWBaS.js";import"./radio-F8oq6XnD.js";import"./MkTutorialDialog-jfmweelM.js";import"./profile-6OYyFMtH.js";import"./split-mI9ZWkMh.js";import"./folder-DNqDLK_K.js";import"./explore.users-T3E41M2s.js";import"./MkUserList-oKr58tvs.js";import"./MkUserInfo-NOodgOlv.js";import"./MkNumber.vue_vue_type_script_setup_true_lang-gu4zp81q.js";import"./number-rE36t967.js";import"./MkPagination-urywMrXv.js";import"./MkFolder-7Ekk-Fp4.js";import"./MkTab.vue_vue_type_style_index_0_lang-bgKDPAJl.js";import"./MkPushNotificationAllowButton.vue_vue_type_script_setup_true_lang-XQVl5ZZe.js";const K={class:"_gaps_m"},O=o("i",{class:"ph-list ph-bold ph-lg"},null,-1),U=[O],G=["onClick"],q=o("i",{class:"ph-x ph-bold ph-lg"},null,-1),J=[q],Q={class:"buttons"},W=o("i",{class:"ph-plus ph-bold ph-lg"},null,-1),X=o("i",{class:"ph-arrow-clockwise ph-bold ph-lg"},null,-1),Y=o("i",{class:"ph-floppy-disk ph-bold ph-lg"},null,-1),Z={value:"sideFull"},tt={value:"sideIcon"},et=N({__name:"navbar",setup(mt){const I=z(()=>D(()=>import("./vuedraggable.umd-STObVg47.js").then(t=>t.v),__vite__mapDeps([0,1,2,3])).then(t=>t.default)),d=L(p.state.menu.map(t=>({id:Math.random().toString(),type:t}))),f=v(p.makeGetterSetter("menuDisplay"));async function h(){const{canceled:t}=await H({type:"info",text:s.ts.reloadToApplySetting});t||T()}async function C(){const t=Object.keys(u).filter(r=>!p.state.menu.includes(r)),{canceled:i,result:e}=await R({title:s.ts.addItem,items:[...t.map(r=>({value:r,text:s.ts[u[r].title]})),{value:"-",text:s.ts.divider}]});i||(d.value=[...d.value,{id:Math.random().toString(),type:e}])}function V(t){d.value.splice(t,1)}async function M(){p.set("menu",d.value.map(t=>t.type)),await h()}function S(){d.value=p.def.menu.default.map(t=>({id:Math.random().toString(),type:t}))}return P(f,async()=>{await h()}),v(()=>[]),v(()=>[]),$({title:s.ts.navbar,icon:"ti ti-list"}),(t,i)=>(x(),w("div",K,[m(B,null,{label:n(()=>[c(l(a(s).ts.navbar),1)]),default:n(()=>[m(F,{showHeader:!1},{default:n(()=>[m(a(I),{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=e=>d.value=e),itemKey:"id",animation:150,handle:"."+t.$style.itemHandle,onStart:i[1]||(i[1]=e=>e.item.classList.add("active")),onEnd:i[2]||(i[2]=e=>e.item.classList.remove("active"))},{item:n(({element:e,index:r})=>{var b,k,g;return[e.type==="-"||a(u)[e.type]?(x(),w("div",{key:0,class:_(t.$style.item)},[o("button",{class:_(["_button",t.$style.itemHandle])},U,2),o("i",{class:_(["ti-fw",[t.$style.itemIcon,(b=a(u)[e.type])==null?void 0:b.icon]])},null,2),o("span",{class:_(t.$style.itemText)},l((g=a(s).ts[(k=a(u)[e.type])==null?void 0:k.title])!=null?g:a(s).ts.divider),3),o("button",{class:_(["_button",t.$style.itemRemove]),onClick:rt=>V(r)},J,10,G)],2)):j("",!0)]}),_:1},8,["modelValue","handle"])]),_:1})]),_:1}),o("div",Q,[m(y,{inline:"",onClick:C},{default:n(()=>[W,c(" "+l(a(s).ts.addItem),1)]),_:1}),m(y,{inline:"",danger:"",onClick:S},{default:n(()=>[X,c(" "+l(a(s).ts.default),1)]),_:1}),m(y,{inline:"",primary:"",class:"save",onClick:M},{default:n(()=>[Y,c(" "+l(a(s).ts.save),1)]),_:1})]),m(A,{modelValue:f.value,"onUpdate:modelValue":i[3]||(i[3]=e=>f.value=e)},{label:n(()=>[c(l(a(s).ts.display),1)]),default:n(()=>[o("option",Z,l(a(s).ts._menuDisplay.sideFull),1),o("option",tt,l(a(s).ts._menuDisplay.sideIcon),1)]),_:1},8,["modelValue"])]))}}),st="_item_dyxbd_1",at="_itemIcon_dyxbd_11",ot="_itemText_dyxbd_17",it="_itemRemove_dyxbd_22",nt="_itemHandle_dyxbd_32",lt={item:st,itemIcon:at,itemText:ot,itemRemove:it,itemHandle:nt},dt={$style:lt},Ht=E(et,[["__cssModules",dt]]);export{Ht as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["vuedraggable.umd-STObVg47.js","app-JmgyQoR0.js","vue-y3KLWBaS.js","app-9iivmIpH.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}