import{M as w}from"./MkPagination-DzUgufpZ.js";import{aA as S,b as s,a9 as B,M as m,o as P,P as D,r as L,d as N,at as I,_ as T}from"./app-QjDgb7aF.js";import{_ as V}from"./MkAvatars.vue_vue_type_style_index_0_lang-C9VK6yA5.js";import{b as j,E as i,j as c,g as _,i as e,k as t,q as n,D as r,u as p,J as f,p as q,F as E,G as F,a as H,f as k}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const $={class:"qkcjvfiv"},G={class:"name"},J=j({__name:"index",setup(W){const d=H(),g={endpoint:"users/lists/list",limit:10};async function u(){const{canceled:o,result:a}=await P({title:s.ts.enterListName});o||(await D("users/lists/create",{name:a}),d.value.reload())}async function h(){const{canceled:o}=await L({type:"warning",text:s.t("removeAreYouSure",{x:"all lists"})});o||(await N("users/lists/delete-all"),I())}const M=k(()=>[]),b=k(()=>[]);return S({title:s.ts.manageLists,icon:"ph-list-bullets ph-bold ph-lg",action:{icon:"ph-plus ph-bold ph-lg",handler:u}}),(o,a)=>{const x=i("MkPageHeader"),y=i("MkA"),v=i("MkSpacer"),C=i("MkStickyContainer");return c(),_(C,null,{header:e(()=>[t(x,{actions:M.value,tabs:b.value,"display-back-button":!0},null,8,["actions","tabs"])]),default:e(()=>[t(v,{"content-max":700},{default:e(()=>[n("div",$,[t(B,{class:"_gap",icon:"list-bullets",card:!0},{default:e(()=>[n("p",null,r(p(s).ts.listsDesc),1),t(m,{primary:"",class:"add",onClick:u},{default:e(()=>[a[0]||(a[0]=n("i",{class:"ph-plus ph-bold ph-lg"},null,-1)),f(" "+r(p(s).ts.createList),1)]),_:1})]),_:1}),t(w,{ref_key:"pagingComponent",ref:d,pagination:g,class:"lists _content"},{default:e(({items:A})=>[(c(!0),q(E,null,F(A,l=>(c(),_(y,{key:l.id,class:"list _panel",to:`/my/lists/${l.id}`},{default:e(()=>[n("div",G,r(l.name),1),t(V,{"user-ids":l.userIds},null,8,["user-ids"])]),_:2},1032,["to"]))),128)),t(m,{onClick:h},{default:e(()=>[a[1]||(a[1]=n("i",{class:"ph-trash ph-bold ph-lg"},null,-1)),f(" "+r(p(s).ts.deleteAll),1)]),_:1})]),_:1},512)])]),_:1})]),_:1})}}}),U=T(J,[["__scopeId","data-v-36832292"]]);export{U as default};
//# sourceMappingURL=index-B0AXpkYS.js.map
