1import{r as d,f as h,j as e,m as t,E as f}from"./index-QiiZ-xPT.js";import{C as l,a as c}from"./card-DkXabqFf.js";const j={homepage:3,podcast:1,learning:1,jobs:2,content:2,footer:3,"learning-library":1,"learning-completion":1,"learning-paths":1,"learning-recommendations":1,"learning-categories":1,"course-catalog":2};function i(n){fetch(`/api/brand-sponsors/${n}/click`,{method:"POST"}).catch(()=>{})}function g(n){fetch(`/api/brand-sponsors/${n}/impression`,{method:"POST"}).catch(()=>{})}function P({zone:n,organizationId:a}){const r=d.useRef(!1),x=a?`/api/brand-sponsors/zone/${n}?organizationId=${a}`:`/api/brand-sponsors/zone/${n}`,{data:u}=h({queryKey:[`/api/brand-sponsors/zone/${n}`,a],queryFn:async()=>{const o=await fetch(x);return o.ok?o.json():[]},staleTime:300*1e3}),p=j[n]||3,s=(u||[]).slice(0,p);if(d.useEffect(()=>{s.length>0&&!r.current&&(r.current=!0,s.forEach(o=>g(o.id)))},[s]),!s.length)return null;switch(n){case"homepage":return e.jsx(b,{sponsors:s});case"podcast":return e.jsx("div",{className:"mb-6",children:e.jsx(m,{sponsors:s,label:"Presented by"})});case"learning":return e.jsx("div",{className:"mb-6",children:e.jsx(m,{sponsors:s,label:"Brought to you by"})});case"jobs":return e.jsx("div",{className:"mb-6 max-w-6xl mx-auto px-4",children:e.jsx(y,{sponsors:s})});case"content":return e.jsx("section",{className:"py-8",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6",children:e.jsx(N,{sponsors:s})})});case"footer":return e.jsx(w,{sponsors:s});case"learning-library":return e.jsx(v,{sponsors:s});case"learning-completion":return e.jsx(k,{sponsors:s});case"learning-paths":return e.jsx(U,{sponsors:s});case"learning-recommendations":return e.jsx(C,{sponsors:s});case"learning-categories":return e.jsx($,{sponsors:s});case"course-catalog":return e.jsx(Z,{sponsors:s});default:return null}}function b({sponsors:n}){return e.jsx("section",{className:"py-12 bg-background","data-testid":"brand-sponsor-homepage",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[e.jsx(t.p,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center text-sm text-muted-foreground uppercase tracking-wider mb-8",children:"Our Partners"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:n.map((a,r)=>e.jsx(t.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:r*.1},children:e.jsx("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),"data-testid":`brand-sponsor-card-${a.id}`,children:e.jsx(l,{className:"h-full hover:shadow-md transition-shadow",children:e.jsxs(c,{className:"p-6 flex flex-col items-center text-center",children:[e.jsx("div",{className:"w-[160px] h-[60px] flex items-center justify-center mb-4",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),e.jsx("h3",{className:"font-semibold text-sm",children:a.name}),a.tagline&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:a.tagline})]})})})},a.id))})]})})}function m({sponsors:n,label:a}){const r=n[0];return r?e.jsx(t.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4},"data-testid":`brand-sponsor-${a.includes("Presented")?"podcast":"learning"}`,children:e.jsx("a",{href:r.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(r.id),className:"block","data-testid":`brand-sponsor-link-${r.id}`,children:e.jsxs("div",{className:"flex items-center gap-4 px-5 py-3 rounded-xl bg-muted/50 border border-border",children:[e.jsx("div",{className:"w-[120px] h-[40px] flex items-center justify-center flex-shrink-0",children:e.jsx("img",{src:r.logoUrl,alt:r.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:a}),e.jsx("span",{className:"font-medium",children:r.name})]})]})})}):null}function y({sponsors:n}){return e.jsxs("div",{"data-testid":"brand-sponsor-jobs",children:[e.jsx("p",{className:"text-sm text-muted-foreground uppercase tracking-wider mb-4",children:"Hiring Partners"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:n.map((a,r)=>
1e.jsx(t.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:r*.1},children:e.jsx("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),"data-testid":`brand-sponsor-card-${a.id}`,children:e.jsx(l,{className:"hover:shadow-md transition-shadow",children:e.jsxs(c,{className:"p-5 flex items-center gap-4",children:[e.jsx("div",{className:"w-[140px] h-[50px] flex items-center justify-center flex-shrink-0",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-sm",children:a.name}),a.tagline&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.tagline})]})]})})})},a.id))})]})}function N({sponsors:n}){return e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4","data-testid":"brand-sponsor-content",children:n.map((a,r)=>e.jsx(t.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:r*.1},children:e.jsx("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),"data-testid":`brand-sponsor-card-${a.id}`,children:e.jsx(l,{className:"hover:shadow-md transition-shadow",children:e.jsxs(c,{className:"p-5",children:[e.jsx("div",{className:"w-[140px] h-[50px] flex items-center justify-center mb-3",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),a.tagline&&e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:a.tagline}),e.jsxs("span",{className:"text-sm font-medium text-primary inline-flex items-center gap-1",children:["Learn More ",e.jsx(f,{size:14})]})]})})})},a.id))})}function w({sponsors:n}){return e.jsx("div",{className:"border-b border-border py-6","data-testid":"brand-sponsor-footer",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[e.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-4 text-center",children:"Our Partners"}),e.jsx("div",{className:"flex flex-wrap items-center justify-center gap-8",children:n.map((a,r)=>e.jsx(t.a,{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),initial:{opacity:0}
1,whileInView:{opacity:1},viewport:{once:!0},transition:{delay:r*.05},className:"opacity-60 hover:opacity-100 transition-opacity","data-testid":`brand-sponsor-footer-${a.id}`,children:e.jsx("div",{className:"w-[120px] h-[48px] flex items-center justify-center",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})})},a.id))})]})})}function v({sponsors:n}){const a=n[0];return a?e.jsx(t.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.4,delay:.2},"data-testid":"brand-sponsor-learning-library",children:e.jsx("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),className:"block","data-testid":`brand-sponsor-link-${a.id}`,children:e.jsxs("div",{className:"flex items-center justify-center gap-3 px-4 py-2.5 rounded-xl bg-muted/30 border border-border/50 mt-4",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Learning partner:"}),e.jsx("div",{className:"w-[80px] h-[28px] flex items-center justify-center flex-shrink-0",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),e.jsx("span",{className:"text-xs font-medium",children:a.name})]})})}):null}function k({sponsors:n}){const a=n[0];return a?e.jsx(t.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.8},className:"mt-4 text-center","data-testid":"brand-sponsor-learning-completion",children:e.jsxs("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),className:"inline-flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors","data-testid":`brand-sponsor-link-${a.id}`,children:[e.jsx("span",{children:"Your learning powered by"}),e.jsx("div",{className:"w-[60px] h-[20px] flex items-center justify-center flex-shrink-0",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),e.jsx("span",{className:"font-medium",children:a.name})]})}):null}function U({sponsors:n}){const a=n[0];return a?e.jsx(t.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4,delay:.3},"data-testid":"brand-sponsor-learning-paths",children:e.jsx("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),className:"block","data-testid":`brand-sponsor-link-${a.id}`,children:e.jsx(l,{className:"hover:shadow-md transition-shadow",children:e.jsxs(c,{className:"p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-3",children:"Path sponsored by"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-[80px] h-[32px] flex items-center justify-center flex-shrink-0",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:a.name}),a.tagline&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.tagline})]})]})]})})})}):null}function C({sponsors:n}){const a=n[0];return a?e.jsx(t.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.1},className:"mb-2","data-testid":"brand-sponsor-learning-recommendations",children:e.jsxs("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),className:"inline-flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors","data-testid":`brand-sponsor-link-${a.id}`,children:[e.jsx("span",{children:"Brought to you by"}),e.jsx("div",{className:"w-[60px] h-[20px] flex items-center justify-center flex-shrink-0",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),e.jsx("span",{className:"font-medium",children:a.name})]})}):null}function $({sponsors:n}){const a=n[0];return a?e.jsx(t.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.3},className:"mb-4","data-testid":"brand-sponsor-learning-categories",children:e.jsx("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),className:"block","data-testid":`brand-sponsor-link-${a.id}`,children:e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-muted/30 border border-border/50",children:[e.jsx("div",{className:"w-[60px] h-[22px] flex items-center justify-center flex-shrink-0",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),a.tagline&&e.jsx("span",{className:"text-xs text-muted-foreground",children:a.tagline})]})})}):null}function Z({sponsors:n}){return e.jsxs("div",{className:"mb-6","data-testid":"brand-sponsor-course-catalog",children:[e.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-3",children:"Featured by"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.map((a,r)=>e.jsx(t.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:r*.1},children:e.jsx("a",{href:a.websiteUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>i(a.id),"data-testid":`brand-sponsor-card-${a.id}`,children:e.jsx(l,{className:"hover:shadow-md transition-shadow",children:e.jsxs(c,{className:"p-4 flex items-center gap-3",children:[e.jsx("div",{className:"w-[80px] h-[32px] flex items-center justify-center flex-shrink-0",children:e.jsx("img",{src:a.logoUrl,alt:a.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:a.name}),a.tagline&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.tagline})]})]})})})},a.id))})]})}export{P as B};
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.