import{aB as L,i as n,$ as y,a4 as D,a$ as I,_ as o,f as w,e as B,n as O}from"./app-JmgyQoR0.js";import{b as X,a as _,w as H,c as m,D as p,h as a,i as t,j as h,l as g,u as N,t as S,z as u,H as U,T as j,d as r}from"./vue-y3KLWBaS.js";const q={key:0},z=X({__name:"index",props:{acct:{},page:{default:"home"}},setup(b){const f=r(()=>o(()=>import("./home-n9yOlZEk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]))),E=r(()=>o(()=>import("./reactions-_Uf33aDA.js"),__vite__mapDeps([23,14,2,1,3,15,5,6,7,8,9,10,11,24]))),$=r(()=>o(()=>import("./clips-IJcnhIam.js"),__vite__mapDeps([25,14,2,1,3,15,26]))),P=r(()=>o(()=>import("./pages-ugYwBY4U.js"),__vite__mapDeps([27,28,1,2,3,29,14,15]))),R=r(()=>o(()=>import("./gallery-ZTFIJ-lo.js"),__vite__mapDeps([30,31,1,2,3,32,14,15,33]))),i=b;L();let l=_(i.page),e=_(null),k=_(null);function v(){i.acct!=null&&(e.value=null,w("users/show",B.parse(i.acct)).then(c=>{e.value=c}).catch(c=>{k.value=c}))}H(()=>i.acct,v,{immediate:!0});const M=m(()=>[]),C=m(()=>e.value?[{key:"home",title:n.ts.overview,icon:"ph-user ph-bold ph-lg"},...y&&y.id===e.value.id||e.value.publicReactions?[{key:"reactions",title:n.ts.reaction,icon:"ph-smiley ph-bold ph-lg"}]:[],...e.value.instance==null?[{key:"clips",title:n.ts.clips,icon:"ph-paperclip ph-bold ph-lg"},{key:"pages",title:n.ts.pages,icon:"ph-file-text ph-bold ph-lg"},{key:"gallery",title:n.ts.gallery,icon:"ph-image-square ph-bold ph-lg"}]:[]]:null);return D(m(()=>e.value?{icon:"ph-user ph-bold ph-lg",title:e.value.name?`${e.value.name} (@${e.value.username})`:`@${e.value.username}`,subtitle:`@${I(e.value)}`,userName:e.value,avatar:e.value,path:`/@${e.value.username}`,share:{title:e.value.name}}:null)),(c,s)=>{const T=p("MkPageHeader"),V=p("MkError"),x=p("MkLoading"),A=p("MkStickyContainer");return a(),t(A,null,{header:h(()=>[g(T,{tab:l.value,"onUpdate:tab":s[0]||(s[0]=d=>l.value=d),actions:M.value,tabs:C.value,"display-back-button":!0},null,8,["tab","actions","tabs"])]),default:h(()=>[N("div",null,[g(j,{name:"fade",mode:"out-in"},{default:h(()=>[e.value?(a(),S("div",q,[l.value==="home"?(a(),t(u(f),{key:0,user:e.value,onRefresh:s[1]||(s[1]=d=>v())},null,8,["user"])):l.value==="reactions"?(a(),t(u(E),{key:1,user:e.value},null,8,["user"])):l.value==="clips"?(a(),t(u($),{key:2,user:e.value},null,8,["user"])):l.value==="pages"?(a(),t(u(P),{key:3,user:e.value},null,8,["user"])):l.value==="gallery"?(a(),t(u(R),{key:4,user:e.value},null,8,["user"])):U("",!0)])):k.value?(a(),t(V,{key:1,onRetry:s[2]||(s[2]=d=>v())})):(a(),t(x,{key:2}))]),_:1})])]),_:1})}}}),J=O(z,[["__scopeId","data-v-3bb577ee"]]);export{J as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["home-n9yOlZEk.js","app-JmgyQoR0.js","vue-y3KLWBaS.js","app-9iivmIpH.css","MkNotes-Z5KXbZLG.js","MkNote-Y7yPCL5J.js","MkReactionsViewer-iZKN4Via.js","MkReactionIcon.vue_vue_type_script_setup_true_lang-MnLL2GJr.js","MkReactionsViewer-61VQsg0B.css","share-available-LNRVMfAE.js","get-note-summary-7eDLQp-L.js","MkNote-UV9dkkjv.css","MkDateSeparatedList.vue_vue_type_style_index_0_lang-bpwwzSpi.js","MkDateSeparatedList-SCrMUCtO.css","MkPagination-urywMrXv.js","MkPagination-fQ2XqY-k.css","MkNotes-6X6DvDal.css","MkTab.vue_vue_type_style_index_0_lang-bgKDPAJl.js","MkTab-HH3OqQOK.css","MkRemoteCaution-zbsuTKfb.js","MkRemoteCaution-jBkNdLea.css","number-rE36t967.js","home-HYsErZDf.css","reactions-_Uf33aDA.js","reactions-YJDQ8Zgl.css","clips-IJcnhIam.js","clips-zeszVnCd.css","pages-ugYwBY4U.js","MkPagePreview-8BrGKE_n.js","MkPagePreview-bm-dBXM8.css","gallery-ZTFIJ-lo.js","MkGalleryPostPreview-Jw-bKwU4.js","MkGalleryPostPreview-v6bPQpo3.css","gallery-aKBnR_zr.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}