const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["vuedraggable.umd-Dm-_IAyK.js","charts-3gEHPHRq.js","vue-Cm77DuTi.js"])))=>i.map(i=>d[i]);
import{v as p,aA as C,b as a,M as y,l as V,r as M,u as S,s as $,_ as D}from"./app-QjDgb7aF.js";import{_ as H}from"./radios.vue_vue_type_style_index_0_lang-DGNN0Cq9.js";import{F as T}from"./slot-BIWBfzr1.js";import{M as R}from"./MkContainer-CNBcUt5w.js";import{n as u}from"./navbar-D_XQl0kT.js";import{b as A,a as B,f as E,w as F,j as b,p as k,k as d,i as l,u as i,x as c,q as o,D as n,H as N,J as f,d as L}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";import"./radio-Co0R5AcD.js";import"./MkTutorialDialog-CFZyQ5Bw.js";import"./profile-ByRIrD3R.js";import"./split-B5EOpoau.js";import"./folder-DKyFtE95.js";import"./explore.users-CF98Gym3.js";import"./MkUserList-DmXj88Tc.js";import"./MkUserInfo-Brwzwv5t.js";import"./MkNumber.vue_vue_type_script_setup_true_lang-DCqylJGQ.js";import"./animation-wAdLxVJ8.js";import"./number-BJeYzK3l.js";import"./MkPagination-DzUgufpZ.js";import"./MkFolder-DXwFMXde.js";import"./MkTab.vue_vue_type_style_index_0_lang-Cn_SAquG.js";import"./MkPushNotificationAllowButton.vue_vue_type_script_setup_true_lang-DvaRqget.js";const P={class:"_gaps_m"},j=["onClick"],O={class:"buttons"},U={value:"sideFull"},q={value:"sideIcon"},z=A({__name:"navbar",setup(Z){const g=L(()=>V(()=>import("./vuedraggable.umd-Dm-_IAyK.js").then(t=>t.v),__vite__mapDeps([0,1,2])).then(t=>t.default)),m=B(p.state.menu.map(t=>({id:Math.random().toString(),type:t}))),v=E(p.makeGetterSetter("menuDisplay"));async function _(){const{canceled:t}=await M({type:"info",text:a.ts.reloadToApplySetting});t||S()}async function h(){const t=Object.keys(u).filter(r=>!p.state.menu.includes(r)),{canceled:e,result:s}=await $({title:a.ts.addItem,items:[...t.map(r=>({value:r,text:a.ts[u[r].title]})),{value:"-",text:a.ts.divider}]});e||(m.value=[...m.value,{id:Math.random().toString(),type:s}])}function x(t){m.value.splice(t,1)}async function I(){p.set("menu",m.value.map(t=>t.type)),await _()}function w(){m.value=p.def.menu.default.map(t=>({id:Math.random().toString(),type:t}))}return F(v,async()=>{await _()}),C({title:a.ts.navbar,icon:"ti ti-list"}),(t,e)=>(b(),k("div",P,[d(T,null,{label:l(()=>[f(n(i(a).ts.navbar),1)]),default:l(()=>[d(R,{showHeader:!1},{default:l(()=>[d(i(g),{modelValue:m.value,"onUpdate:modelValue":e[0]||(e[0]=s=>m.value=s),itemKey:"id",animation:150,handle:"."+t.$style.itemHandle,onStart:e[1]||(e[1]=s=>s.item.classList.add("active")),onEnd:e[2]||(e[2]=s=>s.item.classList.remove("active"))},{item:l(({element:s,index:r})=>[s.type==="-"||i(u)[s.type]?(b(),k("div",{key:0,class:c(t.$style.item)},[o("button",{class:c(["_button",t.$style.itemHandle])},[...e[4]||(e[4]=[o("i",{class:"ph-list ph-bold ph-lg"},null,-1)])],2),o("i",{class:c(["ti-fw",[t.$style.itemIcon,i(u)[s.type]?.icon]])},null,2),o("span",{class:c(t.$style.itemText)},n(i(a).ts[i(u)[s.type]?.title]??i(a).ts.divider),3),o("button",{class:c(["_button",t.$style.itemRemove]),onClick:tt=>x(r)},[...e[5]||(e[5]=[o("i",{class:"ph-x ph-bold ph-lg"},null,-1)])],10,j)],2)):N("",!0)]),_:1},8,["modelValue","handle"])]),_:1})]),_:1}),o("div",O,[d(y,{inline:"",onClick:h},{default:l(()=>[e[6]||(e[6]=o("i",{class:"ph-plus ph-bold ph-lg"},null,-1)),f(" "+n(i(a).ts.addItem),1)]),_:1}),d(y,{inline:"",danger:"",onClick:w},{default:l(()=>[e[7]||(e[7]=o("i",{class:"ph-arrow-clockwise ph-bold ph-lg"},null,-1)),f(" "+n(i(a).ts.default),1)]),_:1}),d(y,{inline:"",primary:"",class:"save",onClick:I},{default:l(()=>[e[8]||(e[8]=o("i",{class:"ph-floppy-disk ph-bold ph-lg"},null,-1)),f(" "+n(i(a).ts.save),1)]),_:1})]),d(H,{modelValue:v.value,"onUpdate:modelValue":e[3]||(e[3]=s=>v.value=s)},{label:l(()=>[f(n(i(a).ts.display),1)]),default:l(()=>[o("option",U,n(i(a).ts._menuDisplay.sideFull),1),o("option",q,n(i(a).ts._menuDisplay.sideIcon),1)]),_:1},8,["modelValue"])]))}}),G="_item_dyxbd_1",J="_itemIcon_dyxbd_11",K="_itemText_dyxbd_17",Q="_itemRemove_dyxbd_22",W="_itemHandle_dyxbd_32",X={item:G,itemIcon:J,itemText:K,itemRemove:Q,itemHandle:W},Y={$style:X},wt=D(z,[["__cssModules",Y]]);export{wt as default};
//# sourceMappingURL=navbar-OykjFeQC.js.map
