1import{r as h,j as e,S as j,q as N,a as n,I as w,ai as b}from"./index-DHmx1Bki.js";import{D as F,B as y}from"./button-BNSjXjOl.js";import{S as A}from"./verified-CZFVq8r_.js";import{u as v,b as l,e as S,f as L,H as $,P as I,A as R,a as C,c as k,d as E}from"./use-get-agent-listings-4HrSHBjW.js";import{R as M}from"./ReactQueryProvider-PgjIkZuc.js";import"./cn-DYuvkdfH.js";import"./ResponsiveDrawer-DoEgjAGc.js";import"./button-DRb0BSz3.js";import"./dialog-D3ThASR0.js";import"./Skeleton-CXyN-bDJ.js";const P=8,V=8,D=({agent:s,listing:a})=>{const[x,r]=h.useState(void 0),{data:c,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:p,isLoading:g}=v({agentId:s.id}),f=async()=>{const t=decodeURIComponent(`${window.location.origin}/@${s.id}/${a?.slug}`);if(typeof navigator.share=="function"){try{await navigator.share({title:a.name,url:t})}catch{}return}await navigator.clipboard.writeText(t)},i=c?.pages.flatMap(t=>t.result.data)??[],o=i.filter(t=>t.id!==a.id).slice(0,P);return e.jsxs(e.Fragment,{children:[e.jsx(j,{templateTitle:`Rensa | ${a?.name}`,description:`${a?.name} by ${s.name} in ${a?.location}`}),e.jsxs(N,{className:"flex max-w-[900px] flex-col gap-8 px-4 py-10 max-[480px]:py-6",children:[e.jsxs(n,{to:"/$id",params:{id:`@${s.id}`},"aria-label":`View ${s.name}'s full profile`,className:"flex items-center justify-between gap-3 rounded-2xl border border-[#F0F0F0] p-4 no-underline hover:bg-[#FAFAFA] hover:no-underline",children:[e.jsxs("section",{className:"flex items-center gap-3",children:[e.jsx(w,{className:"h-[40px] w-[40px] rounded-full bg-[#F4F4F4] object-cover",width:40,height:40,src:s.avatarUrl||F,alt:s.name}),e.jsxs("section",{className:"flex flex-col",children:[e.jsxs("span",{className:"flex items-center gap-1.5 font-groteskMedium font-semibold text-[14px] text-primary",children:["@",s.username,s.isVerified&&e.jsx(A,{className:"h-[16px] w-[16px]"})]}),s.isVerified&&e.jsx("span",{className:"font-groteskRegular text-[#777E90] text-[12px]",children:"Verified Declutter Agent"})]})]}),e.jsx(l,{size:18,className:"text-[#777E90]"})]}),e.jsxs("section",{className:"grid grid-cols-[1fr_420px] gap-8 max-[860px]:flex max-[860px]:flex-col max-[860px]:gap-6",children:[e.jsx(S,{listing:a}),e.jsxs("section",{className:"flex flex-col gap-4",children:[e.jsx(L,{agentId:s.id,listing:a,whatsappNumber:s.whatsappNumber,onShare:f}),e.jsx($,{}),e.jsx(I,{})]})]}),g&&e.jsx("section",{className:"grid grid-cols-4 gap-x-6 gap-y-8 max-[640px]:grid-cols-2 max-[860px]:grid-cols-3 max-[400px]:gap-3",children:Array.from({length:V}).map((t,u)=>e.jsx(R,{},u))}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-px w-full bg-[#F0F0F0]"}),e.jsxs("section",{className:"flex flex-col gap-5",children:[e.jsxs(n,{to:"/$id",params:{id:`@${s.id}`},className:"flex w-fit items-center gap-1.5 font-groteskMedium font-semibold text-[16px] text-secondary no-underline hover:no-underline",children:["More listings from ",e.jsxs("span",{className:"text-primary",children:["@",s.username]}),e.jsx(l,{size:16,className:"text-primary"})]}),e.jsx("section",{className:"grid grid-cols-4 gap-x-6 gap-y-8 max-[640px]:grid-cols-2 max-[860px]:grid-cols-3 max-[400px]:gap-3",children:o.map(t=>e.jsx(C,{agentId:s.id,data:t,whatsappNumber:s.whatsappNumber,onSelect:r},t.id))}),e.jsx("div",{className:"flex w-full items-center justify-center",children:m?e.jsx(y,{onClick:()=>d(),variant:"outline",className:"mx-auto rounded-full border border-[#F0F0F0] px-6 py-2.5 font-groteskMedium text-[13px] text-secondary no-underline hover:bg-[#FAFAFA] hover:no-underline",children:p?"Loading more...":"
1View more"}):e.jsx("p",{className:"font-groteskRegular text-[#777E90] text-[12px]",children:"No more listings to show."})})]})]})]}),e.jsx(k,{data:s}),e.jsx(E,{agentId:s.id,listings:i,activeSlug:x,whatsappNumber:s.whatsappNumber,onSelectSlug:r})]})};function Q(){const{agent:s,listing:a}=b.useLoaderData();return e.jsx(M,{children:e.jsx(D,{agent:s,listing:a})})}export{Q as component};
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.