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