import{as as P,ch as R,ci as B,u as E,r as f,j as e,N as j,D as b,e as v,am as L,c9 as M,P as z,J as F,cj as D,H as V,S as r,ck as $,cl as H,a4 as A,f as d,d as c,b as n,cm as O,cn as T,ce as q,o as G,co as J,cp as K,cq as U,cr as I}from"./index-BUHDA7zi.js";import{C as w}from"./circle-check-BBJ0O2e_.js";const Y="/assets/coach-profile-hero-B5NhNs5x.webp",Q={"stag-hen":{label:"Stag & Hen",icon:J},kids:{label:"Kids Parties",icon:K},corporate:{label:"Corporate",icon:U},schools:{label:"Schools & Clubs",icon:I}};function _(){var g;const{slug:N}=P(),{data:s,isLoading:y}=R(N),{data:i=[],isLoading:k}=B(s==null?void 0:s.id),{openEnquiryModal:W,openCheckDate:x}=E(),[m,C]=f.useState(6),[S,o]=f.useState(!1);if(y)return e.jsxs("div",{className:"page-dark min-h-screen flex flex-col bg-background",children:[e.jsx(j,{}),e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(b,{className:"h-8 w-8 animate-spin text-primary"})}),e.jsx(v,{})]});if(!s)return e.jsx(L,{to:"/locations",replace:!0});const h=s.cities.map(a=>M.find(t=>t.id===a)).filter(Boolean),l=h[0],p=i.reduce((a,t)=>(a[t.category]=(a[t.category]||0)+1,a),{});return e.jsxs("div",{className:"page-dark min-h-screen flex flex-col bg-background",children:[e.jsx(z,{title:`${s.name} | Bubble Football Coach${l?` in ${l.name}`:""} | Spartacus`,description:`Meet ${s.name}, a Spartacus-certified bubble football coach${l?` in ${l.name}`:""}. Delivering high-energy sessions to the UK's #1 rated standard.`}),e.jsx(F,{id:`coach-${s.slug}`,data:D({name:s.name,slug:s.slug,bio:s.bio,photoUrl:s.photo,averageRating:s.averageRating,reviewCount:s.reviewCount??i.length,cities:h.filter(a=>!!a).map(a=>({name:a.name,slug:a.slug})),specialties:Object.keys(p).filter(a=>(p[a]??0)>0).map(a=>{var t;return(t=Q[a])==null?void 0:t.label}).filter(a=>!!a),reviews:i.map(a=>({id:a.id,rating:a.rating,text:a.text,reviewerName:a.reviewerName,date:`${a.year}-01-01`})),maxReviews:8})}),e.jsx(j,{}),e.jsxs("section",{className:"relative min-h-[60vh] flex items-end overflow-hidden",children:[e.jsx(V,{image:Y,overlayVariant:"foreground",overlayOpacity:50}),e.jsx("div",{className:"container mx-auto px-4 relative z-10 pb-16 pt-32 md:pt-40",children:e.jsx("div",{className:"max-w-4xl mx-auto",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-end gap-8",children:[e.jsx(r,{children:e.jsx("div",{className:"relative flex-shrink-0",children:e.jsxs("div",{className:"w-32 h-32 md:w-40 md:h-40 rounded-full overflow-hidden ring-4 ring-white/20 shadow-2xl",children:[e.jsx("img",{src:s.photo,alt:s.name,className:"md:hidden w-full h-full object-cover",style:$(s.photoPositionMobile,s.photoPositionDesktop)}),e.jsx("img",{src:s.photo,alt:s.name,className:"hidden md:block w-full h-full object-cover",style:H(s.photoPositionDesktop)})]})})}),e.jsx(r,{delay:.1,children:e.jsxs("div",{className:"text-center md:text-left",children:[s.coachOfMonthTitle&&e.jsxs("div",{className:"inline-flex items-center gap-2 bg-gradient-to-r from-amber-500 via-yellow-400 to-amber-500 px-4 py-1.5 rounded-sm mb-3 shadow-lg",children:[e.jsx(A,{className:"h-4 w-4 text-amber-900"}),e.jsx("span",{className:"text-xs font-bold text-amber-900 uppercase tracking-wide",children:s.coachOfMonthTitle})]}),e.jsx("h1",{className:"font-display text-5xl md:text-7xl lg:text-8xl font-bold italic text-white uppercase tracking-tight leading-[0.9] mb-3",children:s.name}),e.jsx("div",{className:"flex flex-wrap items-center justify-center md:justify-start gap-4 mb-2",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(d,{className:"h-5 w-5 fill-[#fbbc04] text-[#fbbc04]"}),e.jsx("span",{className:"text-xl font-black text-white",children:Number(s.averageRating).toFixed(1)}),e.jsxs("span",{className:"text-white/40 text-sm",children:["rating · ",s.reviewCount," reviews"]})]})}),s.auditScore>0?e.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-1.5 mb-4",children:[e.jsx(c,{className:"h-4 w-4 text-primary"}),e.jsxs("span",{className:"text-sm text-white/50",children:["Spartacus Audit Score:"," ",e.jsxs("span",{className:"font-bold text-primary",children:[s.auditScore,"%"]}),s.lastAuditDate&&e.jsxs(e.Fragment,{children:[" ","— Audited"," ",new Date(s.lastAuditDate).toLocaleDateString("en-GB",{month:"long",year:"numeric"}),s.auditLocation?`, ${s.auditLocation}`:""]})]})]}):e.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-1.5 mb-4",children:[e.jsx(c,{className:"h-4 w-4 text-white/30"}),e.jsx("span",{className:"text-sm italic text-white/40",children:"No audit on record yet"})]}),e.jsx("p",{className:"text-white/60 text-sm max-w-lg leading-relaxed mb-1",children:"Spartacus-certified coach delivering high-energy, fully hosted sessions."}),e.jsx("div",{className:"flex flex-col sm:flex-row gap-3 mt-6",children:e.jsx(n,{size:"lg",className:"uppercase font-bold tracking-wide",onClick:()=>x(),children:"Check Date"})})]})})]})})})]}),e.jsx("div",{className:"bg-muted border-b border-border",children:e.jsx("div",{className:"container mx-auto px-4 py-3",children:e.jsxs("div",{className:"max-w-4xl mx-auto flex items-center justify-center gap-2",children:[e.jsx(c,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsxs("button",{onClick:()=>o(!0),className:"text-xs text-muted-foreground hover:text-primary transition-colors text-left",children:["Every coach is audited on delivery, safety & standards."," ",e.jsx("span",{className:"underline underline-offset-2",children:"Learn how it works →"})]})]})})}),S&&e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:()=>o(!1),children:[e.jsx("div",{className:"absolute inset-0 bg-foreground/60 backdrop-blur-sm"}),e.jsxs("div",{className:"relative bg-background border border-border rounded-sm max-w-md w-full p-6 md:p-8 shadow-2xl",onClick:a=>a.stopPropagation(),children:[e.jsx("button",{onClick:()=>o(!1),className:"absolute top-3 right-3 text-muted-foreground hover:text-foreground transition-colors text-lg leading-none",children:"✕"}),e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(c,{className:"h-5 w-5 text-primary"}),e.jsx("h3",{className:"font-display text-lg font-black text-foreground uppercase tracking-tight",children:"The Spartacus Audit"})]}),e.jsx("p",{className:"text-foreground/70 text-sm leading-relaxed mb-4",children:"Every coach is regularly assessed during real sessions on:"}),e.jsx("ul",{className:"space-y-2 mb-5",children:["Energy","Structure","Safety","Overall experience"].map(a=>e.jsxs("li",{className:"flex items-center gap-2 text-sm text-foreground",children:[e.jsx(w,{className:"h-4 w-4 text-primary flex-shrink-0"}),a]},a))}),e.jsx("p",{className:"text-foreground/60 text-sm leading-relaxed",children:"Scores reflect recent performance and are published on every profile — for full transparency and consistent high standards."})]})]}),e.jsx("section",{className:"py-12 md:py-16 px-4 bg-secondary",children:e.jsx("div",{className:"container mx-auto max-w-3xl",children:e.jsx(r,{children:e.jsxs("div",{className:"bg-foreground border border-white/10 rounded-sm p-6 md:p-8 space-y-10",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h2",{className:"font-display text-2xl md:text-3xl font-black text-white uppercase tracking-tight leading-[0.95]",children:["About ",e.jsx("span",{className:"text-primary",children:s.name})]}),s.bio&&(()=>{const a=s.bio.match(/^([\s\S]*?)\n+\s*Fun Fact:\s*([\s\S]*)$/i),t=a?a[1].trim():s.bio,u=a?a[2].trim():null;return e.jsxs(e.Fragment,{children:[t&&e.jsx("p",{className:"text-white/60 text-sm md:text-base leading-relaxed whitespace-pre-line",children:t}),u&&e.jsxs("div",{className:"border-l-2 border-primary bg-primary/10 rounded-sm pl-4 pr-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx(O,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-primary",children:"Fun Fact"})]}),e.jsx("p",{className:"text-white/80 text-sm md:text-base leading-relaxed italic",children:u})]})]})})(),s.experience&&e.jsx("p",{className:"text-white/60 text-sm md:text-base leading-relaxed",children:s.experience})]}),(s.certifications.length>0||s.featured)&&e.jsxs("div",{className:"space-y-4 border-t border-white/10 pt-6",children:[e.jsx("h3",{className:"font-display text-lg md:text-xl font-black text-white uppercase tracking-tight",children:"Credentials"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3",children:[s.certifications.map(a=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{className:"h-4 w-4 text-primary flex-shrink-0"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-white/90",children:a})]},a)),s.featured&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(d,{className:"h-4 w-4 fill-primary text-primary flex-shrink-0"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-wide text-primary",children:"Featured Coach"})]})]})]})]})})})}),e.jsxs("section",{className:"relative overflow-hidden py-20 md:py-28 bg-foreground",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.05] pointer-events-none",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}}),e.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[e.jsxs(r,{children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-sm px-4 py-2 bg-primary/10 border border-primary/20",children:[e.jsx(d,{className:"w-4 h-4 fill-current text-primary"}),e.jsxs("span",{className:"text-xs font-bold uppercase tracking-widest text-primary",children:[((g=s.reviewCount)==null?void 0:g.toLocaleString())??i.length,"+ Verified Reviews"]})]})}),e.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-bold italic uppercase tracking-tight leading-[0.95] text-center mb-3 text-white",children:["Real Reviews from",e.jsx("br",{className:"md:hidden"})," ",e.jsxs("span",{className:"text-primary",children:[s.name.split(" ")[0],"'s"]})," ","Sessions"]}),e.jsxs("p",{className:"text-center text-base md:text-lg mb-10 text-white/50",children:["Verified feedback from groups ",s.name.split(" ")[0]," has personally hosted."]})]}),k?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(b,{className:"h-8 w-8 animate-spin text-primary"})}):i.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 max-w-5xl mx-auto",children:i.slice(0,m).map(a=>e.jsx(T,{review:a,showCity:!0,variant:"dark"},a.id))}),i.length>m&&e.jsx("div",{className:"flex justify-center mt-10",children:e.jsx(n,{size:"lg",variant:"outline",className:"uppercase font-bold tracking-wide border-white/20 text-white hover:bg-white/10",onClick:()=>C(a=>a+50),children:"Load More Reviews"})})]}):e.jsx("div",{className:"text-center py-12",children:e.jsxs("p",{className:"text-white/50 text-sm",children:["Reviews for ",s.name," will appear here after events."]})})]})]}),e.jsxs("section",{className:"relative py-20 md:py-28 overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0",children:[e.jsx("img",{src:q,alt:"",className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-foreground/85"})]}),e.jsxs("div",{className:"relative z-10 container mx-auto px-4 text-center",children:[e.jsxs(r,{children:[e.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-bold italic text-white uppercase tracking-tight leading-[0.95] mb-4",children:["Ready to Book",e.jsx("br",{}),e.jsx("span",{className:"text-primary",children:"Your Experience?"})]}),e.jsx("p",{className:"text-white/50 max-w-2xl mx-auto text-base md:text-lg leading-relaxed mb-2",children:"Premium slots fill fast — book early to secure your preferred date and time."}),e.jsx("p",{className:"text-white/40 text-sm mb-10",children:"Takes 2 minutes to secure your slot."})]}),e.jsx(r,{delay:.2,children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[e.jsx(n,{size:"lg",className:"w-full sm:w-auto sm:min-w-[220px]",onClick:()=>x(),children:"Check Date"}),e.jsx(n,{asChild:!0,size:"lg",variant:"outline",className:"w-full sm:w-auto sm:min-w-[220px] border-white/30 text-white hover:bg-white/10",children:e.jsx(G,{to:"/packages",children:"View Packages"})})]})})]})]}),e.jsx(v,{})]})}export{_ as default};