1import{_ as e}from"./EmptyStateTimeline.vue_vue_type_script_setup_true_lang-BkMrXS1j.js";import{_ as t}from"./Loader-B5iADuNm.js";import{_ as s}from"./CommunityFollow-BletRvXc.js";import{f as r,j as o,l as a,ae as l}from"./app-CICyuc6M.js";import{r as i,ay as n,a as u,M as d,o as m,f as c,h as f,u as p,n as g,w as x,x as h,z as v,V as y,W as _,y as b}from"./vendor-_ETPJXLX.js";import"./card-ui-24-regular-B4XFz22F.js";import"./three-dots-loading-Bz_AsDIU.js";import"./user-check-linear-KldYrH_r.js";/* empty css */import"./media-vendor-B3MfMz-y.js";const k={class:"flex flex-col justify-start items-stretch"},j={class:"py-3 px-4 md:px-5 flex justify-start gap-2 md:gap-3 items-center bg-background border-b border-border rounded-t-lg"},w={class:"font-medium text-base md:text-lg"},q={class:"flex flex-col gap-6 px-5 py-4 bg-background rounded-b-lg"},C={class:"flex items-center justify-between w-full"},S={class:"flex items-start w-full gap-3"},z={class:"relative h-10"},E=["src"],I={class:"flex flex-col"},O={class:"text-xs text-endpoint flex items-center gap-0.5"},T={layout:r},F=Object.assign(T,{__name:"Communities",props:{communities:Object,query:String},setup(r){const T=r,F=i(T.query),L=i(null),M=i(!1),{stop:N}=n(L,async([{isIntersecting:e}])=>{if(e&&!M.value&&T.communities?.links?.next){M.value=!0;try{const e=await u.get(T.communities.links.next),t=new Set(T.communities.data.map(e=>e.id)),s=e.data.data.filter(e=>!t.has(e.id));T.communities.data.push(...s),T.communities.links=e.data.links,e.data.links.next||N()}catch(t){console.error("Error fetching communities")}finally{M.value=!1}}});return(i,n)=>{const u=d("router-link"),T=s,N=t,U=e;return m(),c("div",k,[f("div",j,[p(F)?(m(),g(u,{key:0,to:i.route("search",{q:p(F)}),class:"flex group hover:bg-muted p-1.5 rounded-full"},{default:x(()=>[h(p(o),{class:"h-6 w-6 text-endpoint group-hover:text-foreground"})]),_:1},8,["to"])):(m(),g(u,{key:1,to:i.route("explore"),class:"flex group hover:bg-muted p-1.5 rounded-full"},{default:x(()=>[h(p(o),{class:"h-6 w-6 text-endpoint group-hover:text-foreground"})]),_:1},8,["to"])),f("h1",w,v(("__"in i?i.__:p(a))("Communities")),1)]),r.communities?.data?.length?(m(),c(y,{key:0},[f("div",q,[(m(!0),c(y,null,_(r.communities.data,e=>(m(),c("div",{key:e.id},[f("div",C,[f("div",S,[f("div",z,[h(u,{to:i.route("community.show",e),class:"shrink-0"},{default:x(()=>[f("img",{src:e.avatar_url,class:"h-10 bg-background dark:bg-deeper border border-transparent hover:border-border dark:hover:border-primary transition duration-150 ease-linear rounded-full",alt:"avatar"},null,8,E)]),_:2},1032,["to"])]),f("div",I,[h(u,{to:i.route("community.show",e),class:"text-sm font-medium hover:text-muted-foreground dark:hover:text-foreground/90 dark:text-foreground"},{default:x(()=>[b(v(e.name),1)]),_:2},1032,["to"]),f("div",O,[f("span",null,v(e.followers_count),1),f("span",null,v(p(l)(e.followers_count,["ÑÑаÑÑник","ÑÑаÑÑника","ÑÑаÑÑников"])),1)])])]),h(T,{following:e,size:"badge"},null,8,["following"])])]))),128)),h(N,{"is-loading":p(M),onlyIcon:!0},null,8,["is-loading"])]),f("div",{ref_key:"last",ref:L,class:"-translate-y-32"},null,512)],64)):(m(),g(U,{key:1,title:("__"in i?i.__:p(a))("Nothing found"),"with-background":!1},null,8,["title"]))])}}});export{F as default}; 2//# sourceMappingURL=Communities-BGhUGVIj.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.