import{a4 as B,i as o,M as D,ac as m,$ as F,f as L,c as f,bm as P,t as A,bn as v,aA as $,_ as g,A as j,n as R}from"./app-JmgyQoR0.js";import{F as O}from"./suspense-lwY0NW4i.js";import{b as U,a as k,c as x,D as l,h as p,t as _,l as c,j as b,K as z,E as G,z as J,F as K,G as W,u as a,d as M,I as q,J as H}from"./vue-y3KLWBaS.js";const Q=i=>(q("data-v-3faa6945"),i=i(),H(),i),X={class:"_formRoot"},Y=Q(()=>a("i",{class:"ph-plus ph-bold ph-lg"},null,-1)),Z=["onClick"],tt={class:"avatar"},st={class:"body"},et={class:"name"},ot={class:"acct"},nt=U({__name:"accounts",setup(i){const u=k(null),d=k(null),w=async()=>{m().then(t=>(u.value=t.filter(s=>s.id!==F.id),console.log(u.value),L("users/show",{userIds:u.value.map(s=>s.id)}))).then(t=>{d.value=t,console.log(d.value)})};function I(t,s){var e;f([{text:o.ts.switch,icon:"ph-swap ph-bold ph-lg",action:()=>N(t)},{text:o.ts.remove,icon:"ph-trash ph-bold ph-lg",danger:!0,action:()=>C(t)}],(e=s.currentTarget)!=null?e:s.target)}function y(t){var s;f([{text:o.ts.existingAccount,action:()=>{E()}},{text:o.ts.createAccount,action:()=>{T()}}],(s=t.currentTarget)!=null?s:t.target)}function C(t){P(t.id)}function E(){A(M(()=>g(()=>import("./MkSigninDialog-uENcDUA3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),{},{done:t=>{v(t.id,t.i),$()}},"closed")}function T(){A(M(()=>g(()=>import("./MkSignupDialog-ZQvn5QdS.js"),__vite__mapDeps([8,9,4,3,5,10,11]))),{},{done:t=>{v(t.id,t.i),h(t.i)}},"closed")}async function N(t){const e=(await m()).find(r=>r.id===t.id).token;h(e)}function h(t){j(t)}return x(()=>[]),x(()=>[]),B({title:o.ts.accounts,icon:"ph-users ph-bold ph-lg"}),(t,s)=>{const e=l("MkAvatar"),r=l("MkUserName"),S=l("MkAcct");return p(),_("div",X,[c(O,{p:w},{default:b(()=>[c(D,{primary:"",onClick:y},{default:b(()=>[Y,z(" "+G(J(o).ts.addAccount),1)]),_:1}),(p(!0),_(K,null,W(d.value,n=>(p(),_("button",{key:n.id,class:"_panel _button lcjjdxlm",onClick:V=>I(n,V)},[a("div",tt,[c(e,{user:n,class:"avatar",disableLink:""},null,8,["user"])]),a("div",st,[a("div",et,[c(r,{user:n},null,8,["user"])]),a("div",ot,[c(S,{user:n},null,8,["user"])])])],8,Z))),128))]),_:1})])}}}),ut=R(nt,[["__scopeId","data-v-3faa6945"]]);export{ut as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["MkSigninDialog-uENcDUA3.js","MkSigninDialog.vue_vue_type_script_setup_true_lang-Gf0quRp8.js","MkSignin-ikEPb45Z.js","app-JmgyQoR0.js","vue-y3KLWBaS.js","app-9iivmIpH.css","2fa-ubAA2qBP.js","MkSignin-tuwl_2nL.css","MkSignupDialog-ZQvn5QdS.js","MkSignupDialog.vue_vue_type_script_setup_true_lang-yrXzWh22.js","MkCaptcha.vue_vue_type_script_setup_true_lang-lipTeJ2f.js","MkSignupDialog-uSL4NHwy.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}