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