import{r as c,j as e,L as T,k as K,e as W}from"./vendor-react-DgEFbQIi.js";import{S as k,x as O,bi as _,b1 as C,a as U,B,a2 as z,o as G,V as q,cs as F,ct as J}from"./index-DFVuS8SP.js";import"./vendor-amplify-BBi2B1tW.js";import{f as Q}from"./formatters-B6fxn6AA.js";import{g as X,u as Y,b as Z,c as ee,d as se,h as te,f as ae,H as re}from"./profile-config-Dx4Q6eQT.js";import{g as $}from"./listing-utils-CICni2H8.js";import{m as V}from"./vendor-motion-CzLrDd6y.js";import{S as H}from"./star-C0MTo9W6.js";import{C as D,a as A,d as E}from"./card-ChSOkrd8.js";import{I as ie}from"./ImageWithFallback-C1HTj5IA.js";import{L as ne}from"./layout-grid-AgaMjDGc.js";import{C as le}from"./calendar-7-ncaX7W.js";import{t as oe,u as ce,a as de,W as me,f as xe,D as ge}from"./useWeekRange-CK_T-4ho.js";import"./vendor-radix-kdo0k_bv.js";import"./vendor-maps-bOuA10hf.js";import"./briefcase-C1c67ONC.js";import"./copy-Bg4Oavyf.js";import"./badge-check-D5e4IH5i.js";function ue({hostedListings:t,hostName:g=""}){const[r,x]=c.useState("all"),[a,u]=c.useState([]),[p,w]=c.useState(!0),[l,N]=c.useState(new Map);c.useEffect(()=>{async function s(){var m,d,f,M;if(!t||t.length===0){u([]),w(!1);return}const i=[],h=new Map;for(const S of t)try{const o=await C(`/reviews/listing/${S.listingId}`),n=$(S)??S.draftData,j=((d=(m=n==null?void 0:n.basics)==null?void 0:m.title)==null?void 0:d.trim())||((M=(f=n==null?void 0:n.serviceData)==null?void 0:f.cardTitle)==null?void 0:M.trim())||S.title||S.name||"Venue";if(o.totalReviews!==null&&o.totalReviews!==void 0&&o.avgRating!==null){const v=h.get(j);if(v){const L=v.totalReviews+o.totalReviews,I=v.avgRating*v.totalReviews+o.avgRating*o.totalReviews;h.set(j,{totalReviews:L,avgRating:L>0?I/L:0,venueName:j})}else h.set(j,{totalReviews:o.totalReviews,avgRating:o.avgRating,venueName:j})}for(const v of o.reviews)i.push({id:v.id,reviewerName:v.author||"Anonymous",reviewerPhoto:v.profilePhotoUrl||v.profilePhoto||"/images/default-avatar.png",rating:v.rating,date:new Date(v.date).toLocaleString("default",{month:"long",year:"numeric"}),comment:v.comment||"",venueName:j,source:v.type==="google"?"Google":"PLEC"})}catch(o){console.error("Failed loading listing reviews",S.listingId,o)}u(i.sort((S,o)=>new Date(o.date).getTime()-new Date(S.date).getTime())),N(h),w(!1)}s()},[t]);const y=[...new Set(a.map(s=>s.venueName))],R=r==="all"?a:a.filter(s=>s.venueName===r),b=c.useMemo(()=>{let s=0,i=0;if(r==="all")l.forEach(m=>{s+=m.totalReviews,i+=m.avgRating*m.totalReviews});else{const m=l.get(r);m&&(s=m.totalReviews,i=m.avgRating*m.totalReviews)}const h=s===0?0:i/s;return{totalReviews:s,avgRating:Number(h.toFixed(1))}},[l,r]),P=s=>e.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4,5].map(i=>e.jsx(H,{size:16,className:i<=s?"fill-yellow-400 text-yellow-400":"text-gray-300"},i))});return p?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{className:"h-7 w-24"}),e.jsx(k,{className:"h-4 w-64"})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-200 p-6 space-y-4",children:[e.jsxs("div",{className:"flex gap-8",children:[e.jsx(k,{className:"h-12 w-16"}),e.jsx(k,{className:"h-12 w-24"})]}),e.jsx("div",{className:"space-y-3",children:[1,2,3].map(s=>e.jsxs("div",{className:"flex gap-3 p-3 rounded-lg border border-gray-100",children:[e.jsx(k,{className:"h-10 w-10 rounded-full shrink-0"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(k,{className:"h-4 w-full"}),e.jsx(k,{className:"h-4 w-4/5"})]})]},s))})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"mb-6 md:mb-8",children:[e.jsx("h2",{className:"text-gray-900 mb-2",children:"Reviews"}),e.jsxs("p",{className:"text-sm text-gray-500",children:["Showing reviews across all venues hosted by ",g]})]}),e.jsx("div",{className:"bg-white rounded-2xl border border-gray-200 shadow-sm p-6 mb-6 md:mb-8",children:e.jsxs("div",{className:"flex items-center gap-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-3xl text-gray-900 mb-1",children:b.avgRating}),e.jsx("div",{className:"flex items-center justify-center mb-1",children:P(Math.round(b.avgRating))}),e.jsx("div",{className:"text-xs text-gray-500",children:"Average rating"})]}),e.jsx("div",{className:"h-12 w-px bg-gray-200"}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-3xl text-gray-900 mb-1",children:b.totalReviews}),e.jsx("div",{className:"text-xs text-gray-500 mt-2",children:"Total reviews"})]})]})}),y.length>0&&e.jsx("div",{className:"mb-6 md:mb-8",children:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{onClick:()=>x("all"),className:`px-4 py-2 rounded-full text-sm transition-all ${r==="all"?"bg-gray-900 text-white":"bg-white text-gray-600 border border-gray-200 hover:border-gray-300 hover:bg-gray-50"}`,children:"All"}),y.map(s=>e.jsx("button",{onClick:()=>x(s),className:`px-4 py-2 rounded-full text-sm transition-all whitespace-nowrap ${r===s?"bg-gray-900 text-white":"bg-white text-gray-600 border border-gray-200 hover:border-gray-300 hover:bg-gray-50"}`,children:s},s))]})}),R.length>0?e.jsx("div",{className:"space-y-4",children:R.map((s,i)=>e.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:i*.05},className:"bg-white rounded-2xl border border-gray-200 shadow-sm p-5 md:p-6 hover:shadow-md transition-shadow",children:[e.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[s.reviewerPhoto?e.jsx(O,{originalSrc:s.reviewerPhoto,variant:"thumbnail",alt:s.reviewerName,className:"w-12 h-12 rounded-full object-cover"}):e.jsx("img",{src:"/default-profile-icon.png",alt:s.reviewerName,className:"w-12 h-12 rounded-full object-cover"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1",children:[e.jsx("h3",{className:"text-gray-900",children:s.reviewerName}),e.jsx("span",{className:"text-xs text-gray-400 whitespace-nowrap",children:s.date})]}),P(s.rating)]})]}),e.jsx("p",{className:"text-sm text-gray-700 leading-relaxed mb-4",children:s.comment}),e.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-gray-100",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[e.jsx("span",{children:"Reviewed for:"}),e.jsx("span",{className:"text-gray-900",children:s.venueName})]}),e.jsxs("div",{className:"text-xs text-gray-400",children:["Source: ",s.source]})]})]},s.id))}):e.jsx("div",{className:"bg-white rounded-2xl border border-gray-200 shadow-sm p-12 text-center",children:e.jsxs("div",{className:"max-w-sm mx-auto",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(_,{size:28,className:"text-gray-400"})}),e.jsx("h3",{className:"text-gray-900 mb-2",children:"No reviews yet"}),e.jsx("p",{className:"text-sm text-gray-500",children:r==="all"?"This host hasn't received any reviews yet.":`No reviews for ${r} yet.`})]})})]})}function he(t){var x,a,u;const g=$(t)??t.draftData;if(!g)return t.title??"Listing";const r=g;return((x=r==null?void 0:r.serviceData)==null?void 0:x.cardTitle)||((a=r==null?void 0:r.serviceData)==null?void 0:a.title)||((u=r==null?void 0:r.basics)==null?void 0:u.title)||t.title||"Listing"}function fe(t){var p;const g=$(t)??t.draftData,r=t.listingKind==="service";if(!g)return t.coverImage??"/default-venue-image.png";const x=g,a=(x==null?void 0:x.serviceData)??{},u=(a.offerings??[])[0];return r?a.coverImage||(u==null?void 0:u.image)||"/default-venue-image.png":((p=x==null?void 0:x.media)==null?void 0:p.coverImage)||t.coverImage||"/default-venue-image.png"}function ve({stats:t,about:g,listings:r=[],bookingsPreview:x=[],onViewListings:a,onViewReviews:u,className:p}){const w=typeof t.avgRating=="number"&&t.avgRating>0?t.avgRating:null,l=r.slice(0,3),N=x.slice(0,3),y=l.length>0,R=N.length>0,b=!y&&!R,P=(t.totalReviews??0)>0;return e.jsxs("div",{className:U("flex flex-col space-y-6 lg:space-y-7",p),children:[e.jsxs(D,{className:"shrink-0 overflow-hidden rounded-[22px] border border-border bg-card shadow-sm",children:[e.jsx(A,{className:"pb-3 pt-6 px-6 md:pb-4 md:pt-6",children:e.jsx("h3",{className:"text-lg font-semibold leading-tight text-foreground",children:"Insights"})}),e.jsx(E,{className:"px-6 pb-6 pt-0 md:pb-7",children:e.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 sm:grid-cols-3 sm:gap-x-0 sm:gap-y-0 md:gap-y-1",children:X.map(({id:s,label:i,icon:h},m)=>e.jsxs("div",{className:U("flex items-center gap-3 py-2.5 sm:py-0 sm:px-3 md:py-2",m>0&&"sm:border-l sm:border-border sm:pl-5"),children:[e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted",children:e.jsx(h,{className:"h-3.5 w-3.5 text-muted-foreground"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:i}),s==="bookings"&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-base font-medium leading-tight text-foreground",children:[t.eventsAttended," attended"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Events"})]}),s==="listings"&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-base font-medium leading-tight text-foreground",children:[t.listingsCount," published"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Listings"})]}),s==="rating"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-base font-medium leading-tight text-foreground",children:w!=null?w.toFixed(1):"No rating yet"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.totalReviews!=null&&t.totalReviews>0?`${t.totalReviews} reviews`:"Rating"})]})]})]},s))})})]}),e.jsxs(D,{className:"shrink-0 overflow-hidden rounded-[22px] border border-border bg-card shadow-sm",children:[e.jsxs(A,{className:"pb-2 pt-6 px-6 flex flex-row items-center justify-between",children:[e.jsx("h3",{className:"text-xl font-semibold leading-tight text-foreground",children:y?"Listings":R?"Bookings":"Listings"}),y&&a&&e.jsx(B,{variant:"ghost",size:"sm",className:"rounded-full",onClick:a,children:"View all"})]}),e.jsx(E,{className:"px-6 pb-6 pt-0",children:b?e.jsxs("div",{className:"flex min-h-[220px] flex-col items-center justify-center py-10",children:[e.jsx(V.div,{animate:{y:[0,-6,0],scale:[1,1.02,1]},transition:{duration:2.5,repeat:1/0,ease:"easeInOut"},className:"rounded-2xl bg-muted/40 p-8",children:e.jsx(ne,{className:"h-14 w-14 text-muted-foreground"})}),e.jsx("p",{className:"text-muted-foreground mt-4 text-center text-sm max-w-xs",children:"This user hasn't had any listings or bookings yet."})]}):y?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:l.map(s=>{const i=he(s),h=fe(s),d=s.listingKind==="service"?`/service/${s.listingId}`:`/venue/${s.listingId}`;return e.jsxs("a",{href:d,className:"group rounded-xl overflow-hidden border border-border bg-muted/20 hover:bg-muted/40 transition-colors",children:[e.jsx("div",{className:"relative aspect-[4/3] overflow-hidden",children:e.jsx(ie,{src:h,alt:i,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),e.jsxs("div",{className:"p-3",children:[e.jsx("h4",{className:"font-medium text-foreground text-sm line-clamp-2",children:i}),s.locationLabel&&e.jsxs("p",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-1",children:[e.jsx(z,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"truncate",children:s.locationLabel})]})]})]},s.listingId)})}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:N.map(s=>e.jsxs("div",{className:"rounded-xl border border-border bg-muted/20 p-4 flex flex-col justify-center min-h-[120px]",children:[e.jsx(le,{className:"h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"font-medium text-foreground text-sm line-clamp-2",children:s.listingTitle??"Booking"}),s.date&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.date})]},s.bookingId))})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs(D,{className:"shrink-0 overflow-hidden rounded-[22px] border border-border bg-card shadow-sm flex flex-col min-h-[200px]",children:[e.jsx(A,{className:"pb-2 pt-6 px-6",children:e.jsx("h3",{className:"text-xl font-semibold leading-tight text-foreground",children:"About"})}),e.jsx(E,{className:"px-6 pb-6 pt-0 flex-1",children:g?e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed whitespace-pre-wrap",children:g}):e.jsx("p",{className:"text-muted-foreground text-sm",children:"No bio yet."})})]}),e.jsxs(D,{className:"shrink-0 overflow-hidden rounded-[22px] border border-border bg-card shadow-sm flex flex-col min-h-[200px]",children:[e.jsxs(A,{className:"pb-2 pt-6 px-6 flex flex-row items-center justify-between",children:[e.jsx("h3",{className:"text-xl font-semibold leading-tight text-foreground",children:"Reviews"}),u&&e.jsx(B,{variant:"ghost",size:"sm",className:"rounded-full",onClick:u,children:"View all"})]}),e.jsx(E,{className:"px-6 pb-6 pt-0 flex-1",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-muted",children:e.jsx(H,{className:"h-5 w-5 text-muted-foreground"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-base font-medium text-foreground",children:w!=null?`${w.toFixed(1)} average`:"No reviews yet"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:P?`${t.totalReviews} ${(t.totalReviews??0)===1?"review":"reviews"}`:"Reviews from guests will appear here."})]})]})})]})]})]})}function pe(t){const[g,r]=c.useState(null),[x,a]=c.useState(!0),[u,p]=c.useState(null);return c.useEffect(()=>{if(!t){r(null),a(!1);return}(async()=>{try{a(!0),p(null);const l=await C(`/users/profile/stats/${t}`);r(l)}catch(l){console.error("Failed to fetch public user stats:",l),p("Failed to load stats"),r(null)}finally{a(!1)}})()},[t]),{stats:g,loading:x,error:u}}const be=(t,g,r)=>G({queryKey:["publicHostAvailabilityWeek",t,g,r],queryFn:async()=>{const x=`/public/hosts/${encodeURIComponent(t??"")}/availability/week?start=${encodeURIComponent(g)}&days=${r}`;try{const a=await C(x);return a&&Array.isArray(a.blocks)?a:null}catch{return null}},enabled:!!t&&!!g,refetchOnWindowFocus:!1});function je({publicId:t}){const g=c.useMemo(()=>oe(new Date),[]),{days:r,visibleDays:x,start:a,goPrev:u,goNext:p,canGoPrev:w}=ce({minDateKey:g}),{data:l,isLoading:N}=be(t,a,x),[y,R]=de(r),[b,P]=c.useState("available"),s=c.useMemo(()=>((l==null?void 0:l.venues)??[]).map(d=>({listingId:d.listingId,name:d.venueName})),[l]),i=c.useMemo(()=>((l==null?void 0:l.blocks)??[]).flatMap(d=>d.open.map(f=>({listingId:d.listingId,dateKey:d.dateKey,startMinutes:f.startMinutes,endMinutes:f.endMinutes}))),[l]),h=c.useMemo(()=>((l==null?void 0:l.blocks)??[]).flatMap(d=>(d.booked??[]).map(f=>({listingId:d.listingId,dateKey:d.dateKey,startMinutes:f.startMinutes,endMinutes:f.endMinutes}))),[l]),m=c.useMemo(()=>i,[i]);return!l||s.length===0?null:e.jsxs("section",{className:"mt-8",children:[e.jsx("h2",{className:"mb-4 text-lg font-semibold text-foreground",children:"Availability"}),e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(me,{days:r,venues:s,blocks:m,tone:"open",onPrev:u,onNext:p,canGoPrev:w,isLoading:N,emptyMessage:"Nothing open in this range.",renderBlockDetail:(d,f)=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:f.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Open ",xe(d.startMinutes,d.endMinutes)]}),e.jsx(T,{to:`/venue/${d.listingId}`,className:"inline-block text-sm font-medium text-primary hover:underline",children:"View this venue"})]})})}),e.jsx("div",{className:"w-full lg:w-80 lg:shrink-0",children:e.jsx(ge,{days:r,selectedDay:y,onSelectDay:R,tab:b,onTabChange:P,venues:s,open:i,booked:h,isLoading:N,renderVenueAction:d=>e.jsx(T,{to:`/venue/${d.listingId}`,className:"shrink-0 text-xs font-medium text-primary hover:underline",children:"View"})})})]})]})}const we=["overview","listings","reviews"];function Ve(){const{userId:t}=K(),{user:g,loading:r}=q(),x=W(),[a,u]=c.useState(null),[p,w]=c.useState(!0),[l,N]=c.useState("overview"),[y,R]=c.useState(!1),[b,P]=c.useState({total:0,avg:0}),{stats:s}=pe(a==null?void 0:a.publicId),{listings:i}=Y(a==null?void 0:a.publicId);c.useEffect(()=>{async function o(){if(!i||i.length===0){P({total:0,avg:0});return}let n=0,j=0;for(const L of i)try{const I=await C(`/reviews/listing/${L.listingId}`);I.totalReviews&&(n+=I.totalReviews),I.avgRating&&I.totalReviews&&(j+=I.avgRating*I.totalReviews)}catch(I){console.error("Failed fetching reviews for listing",L.listingId,I)}const v=n===0?0:j/n;P({total:n,avg:Number(v.toFixed(1))})}o()},[i]);const h=!r&&g?g.id:null,m=!!t&&!!h&&h===t;c.useEffect(()=>{m&&x("/profile",{replace:!0})},[m,x]);const d=c.useCallback(async()=>{var o;if(!(!t||m||r))try{const n=await C(`/users/profile/by-id/${t}`),j={...n,handle:n.handle||((o=n.preferredName)==null?void 0:o.toLowerCase().replace(/\s+/g,""))||n.publicId};u(j)}catch(n){console.error("Failed to refresh public profile:",n)}},[t,m,r]);if(c.useEffect(()=>{!t||m||r||(async()=>{var o;try{const n=await C(`/users/profile/by-id/${t}`),j={...n,handle:n.handle||((o=n.preferredName)==null?void 0:o.toLowerCase().replace(/\s+/g,""))||n.publicId};u(j)}catch(n){console.error("Public profile fetch failed:",n),u(null)}finally{w(!1)}})()},[t,m,r]),c.useEffect(()=>{if(!t||!a)return;const o=setInterval(()=>d(),3e4),n=()=>d();return window.addEventListener("focus",n),()=>{clearInterval(o),window.removeEventListener("focus",n)}},[t,a,d]),r||m)return null;if(p)return e.jsxs("div",{className:"flex min-h-screen flex-col bg-muted/30 text-foreground",children:[e.jsx(F,{isProfilePage:!0,hideCategories:!0}),e.jsxs("main",{className:"mx-auto w-full max-w-6xl flex-1 px-4 pb-16 pt-5 md:px-8 md:pt-10",children:[e.jsx(Z,{}),e.jsx(k,{className:"mt-9 h-64 w-full rounded-3xl"})]})]});if(!a)return e.jsxs("div",{className:"flex min-h-screen flex-col bg-muted/30 text-foreground",children:[e.jsx(F,{isProfilePage:!0,hideCategories:!0}),e.jsx("main",{className:"mx-auto flex w-full max-w-6xl flex-1 items-center justify-center px-4 py-16 md:px-8",children:e.jsxs("div",{className:"max-w-sm text-center",children:[e.jsx("h1",{className:"text-3xl text-foreground",children:"Profile not found"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"This profile doesn't exist or has been removed."})]})})]});const f={hosted:(s==null?void 0:s.eventsHosted)??(i==null?void 0:i.length)??0,attended:(s==null?void 0:s.eventsAttended)??0,totalReviews:b.total!==void 0?b.total:null,avgRating:b.avg>0?b.avg:(b.avg===0,null)},M=a.preferredName||[a.firstName,a.lastName].filter(Boolean).join(" ")||a.name||"User",S=()=>{switch(l){case"overview":return e.jsxs(e.Fragment,{children:[e.jsx(ve,{stats:{eventsAttended:f.attended,listingsCount:f.hosted,totalReviews:f.totalReviews,avgRating:f.avgRating},about:a.about,listings:i??void 0,onViewListings:()=>N("listings"),onViewReviews:()=>N("reviews")}),e.jsx(je,{publicId:a.publicId})]});case"listings":return e.jsx(re,{userId:a.publicId,showEdit:!1});case"reviews":return e.jsx(ue,{hostedListings:i??[],hostName:a.preferredName||a.name});default:return null}};return e.jsxs("div",{className:"flex min-h-screen flex-col bg-muted/30 text-foreground",children:[e.jsx(F,{isProfilePage:!0,hideCategories:!0}),e.jsxs("main",{className:"mx-auto w-full max-w-6xl flex-1 px-4 pb-16 pt-5 md:px-8 md:pt-10",children:[e.jsx(ee,{displayName:M,photoURL:a.photoURL,memberSince:a.createdAt?Q(a.createdAt):null,organization:a.organization,isOwnProfile:!1,onShare:()=>R(!0)}),e.jsx(se,{className:"mt-7 md:mt-9",items:te,active:l,onChange:o=>we.includes(o)&&N(o),counts:{listings:(i==null?void 0:i.length)??0}}),e.jsx("div",{className:"mt-6",children:S()})]}),e.jsx(J,{}),y&&e.jsx(ae,{name:M,photoURL:a.photoURL,profileUrl:`${window.location.origin}/u/${a.publicId||""}`,onClose:()=>R(!1)})]})}export{Ve as default};