import{d as y,v as p,al as M,aY as B,b as h,U as C,_ as I}from"./app-QjDgb7aF.js";import{M as N}from"./MkContainer-CNBcUt5w.js";import{b as w,c as S,E as f,j as s,g as m,i as c,q as g,u as e,H as d,p as u,F as U,G as V,k as j,D as _,J as A,a as k}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const L={class:"ujigsodd"},D={key:1,class:"stream"},E={key:2,class:"empty"},F=w({__name:"index.photos",props:{user:{}},setup(b){const v=b;let o=k(!0),n=k([]);function x(a){return p.state.disableShowingAnimatedImages?C(a.thumbnailUrl):a.thumbnailUrl}return S(()=>{const a=["image/jpeg","image/png","image/gif","image/apng","image/vnd.mozilla.apng","image/avif"];y("users/notes",{userId:v.user.id,fileType:a,excludeNsfw:p.state.nsfw!=="ignore",limit:10}).then(i=>{for(const r of i)for(const l of r.files)n.value.push({note:r,file:l});o.value=!1})}),(a,i)=>{const r=f("MkLoading"),l=f("MkA");return s(),m(N,{id:"photos-container","max-height":300,foldable:!0},{header:c(()=>[i[0]||(i[0]=g("i",{class:"ph-image ph-bold ph-lg",style:{"margin-right":"0.5em"}},null,-1)),A(_(e(h).ts.images),1)]),default:c(()=>[g("div",L,[e(o)?(s(),m(r,{key:0})):d("",!0),!e(o)&&e(n).length>0?(s(),u("div",D,[(s(!0),u(U,null,V(e(n),t=>(s(),m(l,{key:t.note.id+t.file.id,class:"img",to:e(M)(t.note)},{default:c(()=>[j(B,{hash:t.file.blurhash,src:x(t.file),title:t.file.name},null,8,["hash","src","title"])]),_:2},1032,["to"]))),128))])):d("",!0),!e(o)&&e(n).length==0?(s(),u("p",E,_(e(h).ts.nothing),1)):d("",!0)])]),_:1})}}}),J=I(F,[["__scopeId","data-v-270b5491"]]);export{J as default};
//# sourceMappingURL=index.photos-UDWKlByo.js.map
