import{r as c,j as e,k as W,e as q}from"./vendor-react-CVHocMAO.js";import{G as S,Z as J,c8 as Z,c9 as U,F as A,B as O,cC as Q,O as X,c7 as Y,k as ee,x as se,cw as H,cx as te}from"./index-Daf0Yezg.js";import"./vendor-amplify-BttVyssp.js";import{f as V}from"./formatters-B6fxn6AA.js";import{g as ae,u as le,c as ie,h as re,d as oe,e as ne,f as de,H as ce}from"./ProfileSidebar-CDkZcp9u.js";import{g as _}from"./listing-utils-DWgPJQzT.js";import{m as G}from"./vendor-motion-CP2nHqR4.js";import{S as K}from"./star-2doyMJlo.js";import{C as $,a as B,b as M}from"./card-MAilCaCX.js";import{I as me}from"./ImageWithFallback-D7GOkyky.js";import"./vendor-radix-ChuwBYq6.js";import"./vendor-maps-BX5dXCaZ.js";import"./briefcase-Dnvtz914.js";import"./clipboard-list-O1WPgQbK.js";import"./arrow-right-ByhqabwU.js";import"./copy-CE1S2wlW.js";import"./badge-C8QuJORz.js";import"./gift-CgPyGdUK.js";import"./plus-BN4J6CXk.js";function xe({hostedListings:a,hostName:f=""}){const[l,m]=c.useState("all"),[x,t]=c.useState([]),[v,N]=c.useState(!0),[p,R]=c.useState(new Map);c.useEffect(()=>{async function s(){var g,b,D,I;if(!a||a.length===0){t([]),N(!1);return}const r=[],o=new Map;for(const j of a)try{const u=await U(`/reviews/listing/${j.listingId}`),P=_(j)??j.draftData,L=((b=(g=P==null?void 0:P.basics)==null?void 0:g.title)==null?void 0:b.trim())||((I=(D=P==null?void 0:P.serviceData)==null?void 0:D.cardTitle)==null?void 0:I.trim())||j.title||j.name||"Venue";if(u.totalReviews!==null&&u.totalReviews!==void 0&&u.avgRating!==null){const h=o.get(L);if(h){const n=h.totalReviews+u.totalReviews,i=h.avgRating*h.totalReviews+u.avgRating*u.totalReviews;o.set(L,{totalReviews:n,avgRating:n>0?i/n:0,venueName:L})}else o.set(L,{totalReviews:u.totalReviews,avgRating:u.avgRating,venueName:L})}for(const h of u.reviews)r.push({id:h.id,reviewerName:h.author||"Anonymous",reviewerPhoto:h.profilePhotoUrl||h.profilePhoto||"/images/default-avatar.png",rating:h.rating,date:new Date(h.date).toLocaleString("default",{month:"long",year:"numeric"}),comment:h.comment||"",venueName:L,source:h.type==="google"?"Google":"PLEC"})}catch(u){console.error("Failed loading listing reviews",j.listingId,u)}t(r.sort((j,u)=>new Date(u.date).getTime()-new Date(j.date).getTime())),R(o),N(!1)}s()},[a]);const w=[...new Set(x.map(s=>s.venueName))],T=l==="all"?x:x.filter(s=>s.venueName===l),C=c.useMemo(()=>{let s=0,r=0;if(l==="all")p.forEach(g=>{s+=g.totalReviews,r+=g.avgRating*g.totalReviews});else{const g=p.get(l);g&&(s=g.totalReviews,r=g.avgRating*g.totalReviews)}const o=s===0?0:r/s;return{totalReviews:s,avgRating:Number(o.toFixed(1))}},[p,l]),y=s=>e.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4,5].map(r=>e.jsx(K,{size:16,className:r<=s?"fill-yellow-400 text-yellow-400":"text-gray-300"},r))});return v?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{className:"h-7 w-24"}),e.jsx(S,{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(S,{className:"h-12 w-16"}),e.jsx(S,{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(S,{className:"h-10 w-10 rounded-full shrink-0"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(S,{className:"h-4 w-full"}),e.jsx(S,{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 ",f]})]}),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:C.avgRating}),e.jsx("div",{className:"flex items-center justify-center mb-1",children:y(Math.round(C.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:C.totalReviews}),e.jsx("div",{className:"text-xs text-gray-500 mt-2",children:"Total reviews"})]})]})}),w.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:()=>m("all"),className:`px-4 py-2 rounded-full text-sm transition-all ${l==="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"}),w.map(s=>e.jsx("button",{onClick:()=>m(s),className:`px-4 py-2 rounded-full text-sm transition-all whitespace-nowrap ${l===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))]})}),T.length>0?e.jsx("div",{className:"space-y-4",children:T.map((s,r)=>e.jsxs(G.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:r*.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(J,{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})]}),y(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(Z,{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:l==="all"?"This host hasn't received any reviews yet.":`No reviews for ${l} yet.`})]})})]})}function ge(a){var m,x,t;const f=_(a)??a.draftData;if(!f)return a.title??"Listing";const l=f;return((m=l==null?void 0:l.serviceData)==null?void 0:m.cardTitle)||((x=l==null?void 0:l.serviceData)==null?void 0:x.title)||((t=l==null?void 0:l.basics)==null?void 0:t.title)||a.title||"Listing"}function ue(a){var v;const f=_(a)??a.draftData,l=a.listingKind==="service";if(!f)return a.coverImage??"/default-venue-image.png";const m=f,x=(m==null?void 0:m.serviceData)??{},t=(x.offerings??[])[0];return l?x.coverImage||(t==null?void 0:t.image)||"/default-venue-image.png":((v=m==null?void 0:m.media)==null?void 0:v.coverImage)||a.coverImage||"/default-venue-image.png"}function fe({stats:a,about:f,listings:l=[],bookingsPreview:m=[],onViewListings:x,onViewReviews:t,className:v}){const N=typeof a.avgRating=="number"&&a.avgRating>0?a.avgRating:null,p=l.slice(0,3),R=m.slice(0,3),w=p.length>0,T=R.length>0,C=!w&&!T,y=(a.totalReviews??0)>0;return e.jsxs("div",{className:A("flex flex-col space-y-6 lg:space-y-7",v),children:[e.jsxs($,{className:"shrink-0 overflow-hidden rounded-[22px] border border-border bg-card shadow-sm",children:[e.jsx(B,{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(M,{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:ae.map(({id:s,label:r,icon:o},g)=>e.jsxs("div",{className:A("flex items-center gap-3 py-2.5 sm:py-0 sm:px-3 md:py-2",g>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(o,{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:r}),s==="bookings"&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-base font-medium leading-tight text-foreground",children:[a.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:[a.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:N!=null?N.toFixed(1):"—"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a.totalReviews!=null&&a.totalReviews>0?`${a.totalReviews} reviews`:"Rating"})]})]})]},s))})})]}),e.jsxs($,{className:"shrink-0 overflow-hidden rounded-[22px] border border-border bg-card shadow-sm",children:[e.jsxs(B,{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:w?"Listings":T?"Bookings":"Listings"}),w&&x&&e.jsx(O,{variant:"ghost",size:"sm",className:"rounded-full",onClick:x,children:"View all"})]}),e.jsx(M,{className:"px-6 pb-6 pt-0",children:C?e.jsxs("div",{className:"flex min-h-[220px] flex-col items-center justify-center py-10",children:[e.jsx(G.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(Q,{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."})]}):w?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:p.map(s=>{const r=ge(s),o=ue(s),b=s.listingKind==="service"?`/service/${s.listingId}`:`/venue/${s.listingId}`;return e.jsxs("a",{href:b,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(me,{src:o,alt:r,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:r}),s.locationLabel&&e.jsxs("p",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-1",children:[e.jsx(X,{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:R.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(Y,{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($,{className:"shrink-0 overflow-hidden rounded-[22px] border border-border bg-card shadow-sm flex flex-col min-h-[200px]",children:[e.jsx(B,{className:"pb-2 pt-6 px-6",children:e.jsx("h3",{className:"text-xl font-semibold leading-tight text-foreground",children:"About"})}),e.jsx(M,{className:"px-6 pb-6 pt-0 flex-1",children:f?e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed whitespace-pre-wrap",children:f}):e.jsx("p",{className:"text-muted-foreground text-sm",children:"No bio yet."})})]}),e.jsxs($,{className:"shrink-0 overflow-hidden rounded-[22px] border border-border bg-card shadow-sm flex flex-col min-h-[200px]",children:[e.jsxs(B,{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"}),t&&e.jsx(O,{variant:"ghost",size:"sm",className:"rounded-full",onClick:t,children:"View all"})]}),e.jsx(M,{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(K,{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:N!=null?`${N.toFixed(1)} average`:"No reviews yet"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:y?`${a.totalReviews} ${(a.totalReviews??0)===1?"review":"reviews"}`:"Reviews from guests will appear here."})]})]})})]})]})]})}function he(a){const[f,l]=c.useState(null),[m,x]=c.useState(!0),[t,v]=c.useState(null);return c.useEffect(()=>{if(!a){l(null),x(!1);return}(async()=>{try{x(!0),v(null);const p=await U(`/users/profile/stats/${a}`);l(p)}catch(p){console.error("Failed to fetch public user stats:",p),v("Failed to load stats"),l(null)}finally{x(!1)}})()},[a]),{stats:f,loading:m,error:t}}const z=["overview","listings","reviews"];function $e(){const{userId:a}=W(),{user:f,loading:l}=ee(),m=q(),x=se(),[t,v]=c.useState(null),[N,p]=c.useState(!0),[R,w]=c.useState("overview"),[T,C]=c.useState(!1),[y,s]=c.useState({total:0,avg:0}),{stats:r}=he(t==null?void 0:t.publicId),{listings:o}=le(t==null?void 0:t.publicId);c.useEffect(()=>{async function n(){if(!o||o.length===0){s({total:0,avg:0});return}let i=0,d=0;for(const E of o)try{const F=await U(`/reviews/listing/${E.listingId}`);F.totalReviews&&(i+=F.totalReviews),F.avgRating&&F.totalReviews&&(d+=F.avgRating*F.totalReviews)}catch(F){console.error("Failed fetching reviews for listing",E.listingId,F)}const k=i===0?0:d/i;s({total:i,avg:Number(k.toFixed(1))})}n()},[o]);const g=!l&&f?f.id:null,b=!!a&&!!g&&g===a;c.useEffect(()=>{b&&m("/profile",{replace:!0})},[b,m]);const D=c.useCallback(async()=>{var n;if(!(!a||b||l))try{const i=await U(`/users/profile/by-id/${a}`),d={...i,handle:i.handle||((n=i.preferredName)==null?void 0:n.toLowerCase().replace(/\s+/g,""))||i.publicId};v(k=>{const E={...d};return i.followersCount!==void 0&&i.followersCount!==null?E.followersCount=typeof i.followersCount=="string"?parseInt(i.followersCount,10):Number(i.followersCount)||0:E.followersCount=(k==null?void 0:k.followersCount)??0,i.followingCount!==void 0&&i.followingCount!==null?E.followingCount=typeof i.followingCount=="string"?parseInt(i.followingCount,10):Number(i.followingCount)||0:E.followingCount=(k==null?void 0:k.followingCount)??0,E})}catch(i){console.error("Failed to refresh public profile:",i)}},[a,b,l]);if(c.useEffect(()=>{!a||b||l||(async()=>{var n;try{const i=await U(`/users/profile/by-id/${a}`),d={...i,handle:i.handle||((n=i.preferredName)==null?void 0:n.toLowerCase().replace(/\s+/g,""))||i.publicId};d.followersCount!==void 0&&d.followersCount!==null?d.followersCount=typeof d.followersCount=="string"?parseInt(d.followersCount,10):Number(d.followersCount)||0:d.followersCount=0,d.followingCount!==void 0&&d.followingCount!==null?d.followingCount=typeof d.followingCount=="string"?parseInt(d.followingCount,10):Number(d.followingCount)||0:d.followingCount=0,v(d)}catch(i){console.error("Public profile fetch failed:",i),v(null)}finally{p(!1)}})()},[a,b,l]),c.useEffect(()=>{if(!a||!t)return;const n=setInterval(()=>D(),3e4),i=()=>D();return window.addEventListener("focus",i),()=>{clearInterval(n),window.removeEventListener("focus",i)}},[a,t,D]),l||b)return null;if(N)return e.jsxs("div",{className:"flex min-h-screen flex-col bg-muted/30 text-foreground",children:[e.jsx(H,{isProfilePage:!0,hideCategories:!0}),e.jsx("div",{className:A("flex min-h-0 flex-1 flex-col w-full px-4 md:px-8 py-6 md:py-10","mx-auto max-w-[1440px]"),children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 lg:flex-row",children:[e.jsx("div",{className:"hidden lg:flex lg:w-[380px] lg:shrink-0",children:e.jsx(S,{className:"h-[420px] w-full rounded-[22px]"})}),e.jsx("div",{className:"min-w-0 flex-1 space-y-4",children:e.jsx(S,{className:"h-64 w-full rounded-[22px]"})})]})})]});if(!t)return e.jsxs("div",{className:"flex min-h-screen flex-col bg-muted/30 text-foreground",children:[e.jsx(H,{isProfilePage:!0,hideCategories:!0}),e.jsx("div",{className:A("flex min-h-0 flex-1 flex-col w-full px-4 md:px-8 py-6 md:py-10","mx-auto max-w-[1440px]"),children:e.jsx("div",{className:"flex justify-center items-center min-h-[400px]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-2",children:"User not found"}),e.jsx("p",{className:"text-muted-foreground",children:"The user profile you're looking for doesn't exist or has been removed."})]})})})]});const I={hosted:(r==null?void 0:r.eventsHosted)??(o==null?void 0:o.length)??0,attended:(r==null?void 0:r.eventsAttended)??0,totalReviews:y.total!==void 0?y.total:null,avgRating:y.avg>0?y.avg:(y.avg===0,null)},j=t.preferredName||[t.firstName,t.lastName].filter(Boolean).join(" ")||t.name||"User",u=async()=>{await D()},P={bookingsCount:0,listingsCount:(o==null?void 0:o.length)??0,savedCount:0,rating:I.avgRating??void 0},L=()=>{switch(R){case"overview":return e.jsx(fe,{stats:{eventsAttended:I.attended,listingsCount:I.hosted,totalReviews:I.totalReviews,avgRating:I.avgRating},about:t.about,listings:o??void 0,onViewListings:()=>w("listings"),onViewReviews:()=>w("reviews")});case"listings":return e.jsx(ce,{userId:t.publicId,showEdit:!1});case"reviews":return e.jsx(xe,{hostedListings:o??[],hostName:t.preferredName||t.name});default:return null}},h=e.jsx(ie,{displayName:j,photoURL:t.photoURL,memberSince:t.createdAt?V(t.createdAt):void 0,about:t.about,location:void 0,stats:P,followersCount:t.followersCount??0,followingCount:t.followingCount??0,badges:{},activeTab:R,onTabChange:n=>z.includes(n)&&w(n),onEdit:()=>{},onShare:()=>C(!0),onSettings:()=>{},isOwnProfile:!1,publicId:t.publicId,navItems:re,targetPublicId:t.publicId,onFollowingDelta:u,followingListHidden:t.followingListHidden});return e.jsxs("div",{className:"flex min-h-screen flex-col bg-muted/30 text-foreground",children:[e.jsx(H,{isProfilePage:!0,hideCategories:!0}),e.jsx("div",{className:A("flex min-h-0 flex-1 flex-col w-full px-4 md:px-8 py-6 md:py-10","mx-auto max-w-[1440px]","min-h-[calc(100vh-5rem)]"),children:e.jsxs("div",{className:"flex min-h-full flex-1 flex-col gap-8 lg:flex-row",children:[e.jsx("div",{className:"hidden lg:flex lg:w-[380px] lg:shrink-0 lg:flex-col",children:e.jsx("div",{className:"sticky top-24 h-full min-h-0 w-full",children:h})}),e.jsxs("div",{className:"flex min-h-full flex-1 flex-col gap-6 lg:contents",children:[e.jsx("div",{className:"lg:hidden",children:e.jsx($,{className:"overflow-hidden rounded-[22px] border border-border bg-card shadow-sm",children:e.jsx(M,{className:"p-6",children:e.jsx(oe,{displayName:j,photoURL:t.photoURL,memberSince:t.createdAt?V(t.createdAt):void 0,about:t.about,location:void 0,followersCount:t.followersCount??0,followingCount:t.followingCount??0,badges:{},onEdit:()=>{},onShare:()=>C(!0),onSettings:()=>{},isOwnProfile:!1,publicId:t.publicId,targetPublicId:t.publicId,onFollowingDelta:u,followingListHidden:t.followingListHidden})})})}),e.jsx("div",{className:"flex items-center gap-2 lg:hidden",children:e.jsx("div",{className:"flex min-w-0 flex-1 overflow-x-auto scrollbar-hide gap-1 pb-1",children:z.map(n=>e.jsx(O,{variant:R===n?"secondary":"ghost",size:"sm",className:A("shrink-0 rounded-full capitalize",R===n&&"bg-background font-medium text-foreground shadow-sm hover:bg-muted/80 hover:text-foreground"),onClick:()=>w(n),children:ne[n]},n))})}),e.jsx("main",{className:A("min-h-0 min-w-0 flex-1 overflow-auto",x&&"flex-none overflow-visible"),children:L()})]})]})}),e.jsx(te,{}),T&&e.jsx(de,{name:j,followers:t.followersCount??0,photoURL:t.photoURL,profileUrl:`${window.location.origin}/u/${t.publicId||""}`,onClose:()=>C(!1)})]})}export{$e as default};