1import{U as m,j as e,V as y,W as N,X as v,Y as p,c as w,r as u,L as o,b as g}from"./index-SF1vOKJG.js";import{S as h,P as b}from"./site-shell-BNXviLbt.js";const k={partner:v,donate:N};function D(){const{slug:s}=m.useParams(),{jobPostings:t}=m.useLoaderData();if(s==="careers")return e.jsx(L,{jobPostings:t});const a=k[s];if(!a)throw y();return e.jsx(S,{page:a})}function f({label:s}){return e.jsx("div",{className:"mx-auto max-w-7xl px-6 lg:px-10 pt-10",children:e.jsx(o,{to:"/get-involved",className:"text-sm font-semibold text-secondary-deep hover:text-secondary transition-colors",children:s})})}function S({page:s}){return e.jsxs(h,{children:[e.jsx(b,{eyebrow:s.header.eyebrow??"",title:s.header.title??"",subtitle:s.header.text}),e.jsx(f,{label:s.backLabel}),e.jsx("section",{className:"py-24",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-6 lg:px-10",children:[e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:s.items.map(t=>{const a=e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":!0,className:"block h-2 w-10 rounded-full bg-primary"}),e.jsx("h2",{className:"mt-5 text-xl font-bold",children:t.name}),e.jsx("p",{className:"mt-3 text-sm text-muted-foreground leading-relaxed",children:t.description??s.itemBody}),t.slug&&e.jsxs("span",{className:"mt-5 inline-flex items-center gap-1 text-sm font-semibold text-secondary-deep",children:["View event ",e.jsx("span",{"aria-hidden":!0,children:"â"})]})]});return t.slug?e.jsx(o,{to:"/events/$slug",params:{slug:t.slug},className:"rounded-xl bg-card border border-border p-8 hover:border-secondary transition-colors block",children:a},t.name):e.jsx("div",{className:"rounded-xl bg-card border border-border p-8 hover:border-secondary transition-colors",children:a},t.name)})}),e.jsx("div",{className:"mt-14",children:e.jsxs(o,{to:"/contact",className:"inline-flex items-center gap-2 rounded-lg bg-secondary text-secondary-foreground px-7 py-4 font-semibold hover:-translate-y-0.5 transition-transform",children:["Talk to our team ",e.jsx("span",{"aria-hidden":!0,children:"â"})]})})]})})]})}function L({jobPostings:s}){const{hero:t,aiStatement:a,openRoles:l}=p;return e.jsxs(h,{children:[e.jsx(b,{eyebrow:t.eyebrow,title:t.title,subtitle:t.text}),e.jsx(f,{label:p.backLabel}),e.jsx("section",{className:"py-24",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-6 lg:px-10 grid lg:grid-cols-12 gap-12 items-stretch",children:[e.jsx("div",{className:"lg:col-span-5",children:e.jsx("img",{src:u(t.images[0]),srcSet:w(t.images[0]),sizes:"(min-width: 1024px) 40vw, 100vw",alt:"Learners and educators at a STEAMLabs Africa program",loading:"lazy",decoding:"async",className:"h-full w-full rounded-xl object-cover aspect-[4/3] lg:aspect-auto"})}),e.jsxs("div",{className:"lg:col-span-7 rounded-xl bg-card border border-border p-8 lg:p-12",children:[e.jsx("div",{className:"text-xs uppercase tracking-[0.22em] text-secondary-deep font-semibold",children:a.eyebrow}),e.jsx("h2",{className:"mt-4 text-3xl lg:text-5xl font-bold leading-[1.05] text-balance",children:a.title}),e.jsx("p",{className:"mt-6 text-muted-foreground leading-relaxed",children:a.body}),e.jsx("div",{className:"mt-8 rounded-lg bg-primary p-6 text-primary-foreground",children:e.jsx("p",{className:"text-sm font-medium leading-relaxed",children:a.callout})})]})]})}),e.jsx("section",{className:"py-24 bg-ink text-ink-foreground",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-6 lg:px-10",children:[e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("div",{className:"text-xs uppercase tracking-[0.22em] text-primary font-semibold",children:l.header.eyebrow}),e.jsx("h2",{className:"mt-4 text-3xl lg:text-5xl font-bold leading-[1.05] text-balance",children:l.header.title}),e.jsx("p",{className:"mt-5 text-lg",children:l.header.text})]}),s.length===0?e.jsxs("p",{className:"mt-16 text-muted-foreground",children:["No open roles right now â check back soon, or"," ",e.jsx(o,{to:"/contact",className:"underline hover:text-primary",children:"get in touch"})," ","if youâd like to be considered for future openings."]}):e.jsx("div",{className:"mt-16 grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:s.map(r=>e.jsxs("article",{className:"flex flex-col rounded-xl overflow-hidden bg-background text-foreground transition-colors",children:[e.jsx("img",{src:u("leadership"),alt:`The STEAMLabs Africa team â ${r.title}`,loading:"lazy",decoding:"async",className:"aspect-[4/3] w-full object-cover"}),e.jsxs("div",{className:"flex flex-col flex-1 p-8",children:[e.jsx("span",{className:"self-start rounded-full bg-primary text-primary-foreground px-3 py-1 text-xs font-bold uppercase tracking-wide",children:"Now Hiring"}),e.jsx("h3",{className:"mt-4 text-2xl font-bold",children:r.title}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:[r.department,r.location,r.employmentType].filter(
1Boolean).join(" · ")}),e.jsx("p",{className:"mt-3 text-sm text-muted-foreground leading-relaxed line-clamp-4",children:r.description}),r.deadline&&e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Apply by ",new Date(r.deadline).toLocaleDateString()]}),e.jsx(A,{roleSlug:r.slug,roleTitle:r.title})]})]},r.slug))})]})})]})}function A({roleSlug:s,roleTitle:t}){const[a,l]=g.useState(!1),[r,n]=g.useState({phase:"idle"});return r.phase==="done"?e.jsxs("p",{className:"mt-6 rounded-lg bg-primary/10 px-4 py-3 text-sm font-medium text-primary",children:["Application received â thank you for applying to ",t,"."]}):a?e.jsxs("form",{className:"mt-6 space-y-3",onSubmit:d=>{d.preventDefault();const j=d.currentTarget;n({phase:"submitting"});const i=new FormData(j);i.set("roleSlug",s),fetch("/api/careers/apply",{method:"POST",body:i}).then(async c=>{const x=await c.json().catch(()=>({}));if(!c.ok||!x.ok){n({phase:"error",error:x.error??"Something went wrong."});return}n({phase:"done"})}).catch(()=>n({phase:"error",error:"Network error â please try again."}))},children:[e.jsx("input",{type:"text",name:"website",tabIndex:-1,autoComplete:"off",className:"hidden","aria-hidden":!0}),e.jsx("input",{name:"name",required:!0,placeholder:"Full name",className:"w-full rounded-lg border border-border bg-card px-4 py-2.5 text-sm"}),e.jsx("input",{type:"email",name:"email",required:!0,placeholder:"Email address",className:"w-full rounded-lg border border-border bg-card px-4 py-2.5 text-sm"}),e.jsx("input",{type:"tel",name:"phone",placeholder:"Phone (optional)",className:"w-full rounded-lg border border-border bg-card px-4 py-2.5 text-sm"}),e.jsx("textarea",{name:"coverNote",rows:3,placeholder:"Why would you like to join STEAMLabs Africa? (optional)",className:"w-full rounded-lg border border-border bg-card px-4 py-2.5 text-sm"}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:"Résumé (PDF or Word, max 5MB)"}),e.jsx("input",{type:"file",name:"resume",required:!0,accept:".pdf,.doc,.docx",className:"mt-1 block w-full text-sm"})]}),r.phase==="error"&&e.jsx("p",{className:"text-sm text-destructive",children:r.error}),e.jsx("button",{type:"submit",disabled:r.phase==="submitting",className:"inline-flex items-center gap-2 self-start rounded-full bg-secondary text-secondary-foreground px-7 py-4 font-semibold hover:-translate-y-0.5 transition-transform disabled:opacity-60",children:r.phase==="submitting"?"Submittingâ¦":"Submit application"})]}):e.jsxs("button",{type:"button",onClick:()=>l(!0),className:"mt-6 inline-flex items-center gap-2 self-start rounded-full bg-secondary text-secondary-foreground px-7 py-4 font-semibold hover:-translate-y-0.5 transition-transform",children:["Apply Now ",e.jsx("span",{"aria-hidden":!0,children:"â"})]})}export{D 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.