1import{c as be,j as e,h as P,m as z,J as R,B as D,e as oe,X as je,r as F,N as ge,O as Ne,a1 as ve,a2 as we,a3 as _e,Q as ye,V as ke,x as ne,E as Ae,i as de,l as ce,s as N,k as Ce,ad as Ie,aK as Se,bK as De,bu as Le,U as Te}from"./index-DLd_kDlx.js";import{T as Ee}from"./TechLeadHeader-eLOg3V3h.js";import{C as me}from"./circle-x-C4PFt3c3.js";import{a as Ue}from"./useMultilateralTechLeadInvitations-CzvKFiLJ.js";import"./dropdown-menu-DSd1c3Vk.js";import"./index-Deh-4PO1.js";import"./index-lTaZyIGy.js";import"./chevron-right-CD1gvy-q.js";import"./NotificationIcon-C1wwYnH5.js";import"./popover-BMD5FOmU.js";import"./scroll-area-BXTuUF24.js";import"./index-BdQq_4o_.js";import"./NotificationItem-Dc2WXW-y.js";import"./formatDistanceToNow-57P64IbE.js";import"./en-US-9SRVm7yB.js";import"./differenceInCalendarMonths-BA0TPVs2.js";import"./endOfDay-DkR3ZXc8.js";import"./endOfMonth-CYn6pTOm.js";import"./message-square-CtxeCfRz.js";import"./trophy-DBX-jNOC.js";import"./triangle-alert-Chqk_WK7.js";import"./rotate-ccw-Bx1C64Ur.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const q=be("MailOpen",[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]]),Fe=({invitation:a,onViewDetails:r,onAccept:n,onReject:x})=>{var b;return e.jsx(P,{className:"rounded-[20px] border border-slate-200/80 bg-white shadow-sm transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_18px_45px_rgba(15,23,42,0.08)]",children:e.jsxs(z,{className:"p-4",children:[e.jsxs("div",{className:"mb-3 flex flex-col gap-2 md:flex-row md:items-start md:justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-950",children:((b=a.projects)==null?void 0:b.title)||"Project"}),e.jsxs("div",{className:"mt-1 text-xs text-slate-500",children:["Applied: ",new Date(a.applied_at).toLocaleDateString()]})]}),e.jsx("div",{children:e.jsx(R,{variant:"outline",className:`capitalize mx-1 ${a.status==="pending"?"border-amber-200 bg-amber-50 text-amber-700":a.status==="accepted"?"border-emerald-200 bg-emerald-50 text-emerald-700":"border-red-200 bg-red-50 text-red-700"}`,children:a.status})})]}),e.jsxs("div",{className:"mb-4 line-clamp-2 text-sm leading-6 text-slate-600",children:[a.cover_letter.slice(0,100),"..."]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(D,{size:"sm",onClick:()=>r(a),className:"rounded-full bg-xterns-navy text-white hover:bg-xterns-navy2",children:"View Details"}),a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(D,{size:"sm",variant:"default",onClick:()=>n(a.id),className:"rounded-full bg-emerald-600 text-white hover:bg-emerald-700",children:[e.jsx(oe,{className:"h-4 w-4 mr-1"}),"Accept"]}),e.jsxs(D,{size:"sm",variant:"destructive",onClick:()=>x(a.id),className:"rounded-full",children:[e.jsx(je,{className:"h-4 w-4 mr-1"}),"Reject"]})]})]})]})},a.id)},Re=({selected:a,onClose:r,onAccept:n,onReject:x})=>{var l,g,y,v,i,o,h,w,k,E,L;const b=F.useMemo(()=>{var p,j,_;if(!a)return;const u=[(p=a==null?void 0:a.ei_score_data)==null?void 0:p.score,(j=a==null?void 0:a.application_data)==null?void 0:j.eiScore,(_=a==null?void 0:a.xtern_profile)==null?void 0:_.ei_score];for(const c of u){const d=typeof c=="string"?parseFloat(c):typeof c=="number"?c:NaN;if(!Number.isNaN(d)&&d>0)return d}},[a]);return e.jsx(ge,{open:!!a,onOpenChange:r,children:e.jsx(Ne,{className:"max-w-3xl w-full md:max-w-3xl rounded-2xl shadow-2xl border border-gray-100 bg-white p-0 overflow-visible animate-fade-in",children:a&&e.jsxs("div",{className:"relative flex flex-col md:flex-row",children:[e.jsxs("div",{className:"bg-gradient-to-b from-blue-50 to-white rounded-l-2xl md:w-60 flex flex-col items-center py-10 px-6 border-r border-gray-100",children:[e.jsxs(ve,{className:"w-24 h-24 shadow-lg border-4 border-white mb-4",children:[e.jsx(we,{src:((l=a==null?void 0:a.xtern_profile)==null?void 0:l.avatar_url)||void 0,alt:`${((g=a==null?void 0:a.application_data)==null?void 0:g.fullName)||((y=a==null?void 0:a.xtern_profile)==null?void 0:y.full_name)||"Applicant"} profile picture`}),e.jsx(_e,{className:"text-4xl font-bold",children:(()=>{var p,j,_,c;const u=((p=a==null?void 0:a.xtern_profile)==null?void 0:p.full_name)||((j=a==null?void 0:a.application_data)==null?void 0:j.fullName);if(u){const d=u.trim().split(" ");return(d.length>1?`${d[0][0]}${d[d.length-1][0]}`:`${u[0]}`).toUpperCase()}return((c=(_=a==null?void 0:a.applicant_id)==null?void 0:_[0])==null?void 0:c.toUpperCase())||"ð¤"})()})]}),e.jsx("h3",{className:"text-lg font-bold text-gray-800 text-center mb-3",children:((v=a==null?void 0:a.xtern_profile)==null?void 0:v.full_name)||((i=a==null?void 0:a.application_data)==null?void 0:i.fullName)||"N/A"}),e.jsxs("div",{className:"w-full bg-white rounded-xl shadow flex flex-col items-center py-4 px-2 mb-4 border",children:[e.jsx("span",{className:"text-gray-500 text-xs font-medium mb-1",children:"Signal Score"}),e.jsx("span",{className:"text-2xl font-bold text-primary",children:b!==void 0?b.toFixed(1):"-"})]}),e.jsxs("div",{className:"w-full flex flex-col items-center bg-gray-50 rounded-xl shadow px-2 py-3 mb-4 border",children:[e.jsx("span",{className:"text-gray-500 text-xs font-medium mb-1",children:"Experience"}),e.jsxs("span",{className:"text-lg font-semibold",children:[((o=a.application_data)==null?void 0:o.totalExperience)??"-"," ",((h=a.application_data)==null?void 0:h.totalExperience)===1?"year":"years"]})]}),e.jsxs("div",{className:"w-full flex flex-col items-center rounded-xl bg-gray-50 shadow px-2 py-3 mb-4 border",children:[e.jsx("span",{className:"text-gray-500 text-xs font-medium mb-1",children:"Completed Projects"}),e.jsx("span",{className:"text-lg font-semibold",children:((k=(w=a.application_data)==null?void 0:w.completedProjects)==null?void 0:k.length)??"-"})]}),e.jsxs("div",{className:"w-full flex flex-col items-center rounded-xl bg-gray-50 shadow px-2 py-3 border",children:[e.jsx("span",{className:"text-gray-500 text-xs font-medium mb-2",children:"Career Path"}),e.jsx("div",{className:"flex flex-wrap gap-1 justify-center",children:(E=a==null?void 0:a.xtern_profile)!=null&&E.preferred_roles&&a.xtern_profile.preferred_roles.length>0?a.xtern_profile.preferred_roles.map((u,p)=>e.jsx(R,{variant:"secondary",className:"text-xs capitalize",children:u},p)):e.jsx("span",{className:"text-sm text-gray-400",children:"N/A"})})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 p-8",children:[e.jsx(ye,{className:"p-0 mb-6",children:e.jsx(ke,{className:"text-3xl font-extrabold text-violet-900 mb
6-1 tracking-tight flex items-center gap-2",children:"Invitation Details"})}),e.jsxs("div",{className:"mb-5",children:[e.jsx("span",{className:"font-bold text-primary/90 text-lg mr-1",children:"Project:"}),e.jsx("span",{className:"text-lg font-semibold",children:((L=a.projects)==null?void 0:L.title)??"N/A"})]}),e.jsxs("section",{className:"mb-8",children:[e.jsxs("h4",{className:"font-bold text-md text-gray-800 mb-2 flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary mr-1"}),"Cover Letter"]}),e.jsx("div",{className:"bg-gray-50/90 border border-gray-100 rounded-xl py-4 px-5 text-gray-700 font-medium text-base min-h-[60px] shadow-sm",children:a.cover_letter})]}),e.jsxs("section",{children:[e.jsxs("h4",{className:"font-bold text-md text-gray-800 mb-2 flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-indigo-600 mr-1"}),"Applicant Profile"]}),e.jsx("div",{className:"p-6 pb-4 rounded-2xl border border-gray-100 bg-gradient-to-bl from-white to-blue-50 shadow-inner flex flex-col gap-4",children:(()=>{var d,A,T,C,I;const u=Array.isArray((d=a==null?void 0:a.application_data)==null?void 0:d.skills)?(A=a==null?void 0:a.application_data)==null?void 0:A.skills:[],p=(T=a==null?void 0:a.xtern_profile)==null?void 0:T.skill_proficiencies,j=Array.isArray(p)?p.map(f=>typeof f=="string"?f:(f==null?void 0:f.name)??(f==null?void 0:f.skill)??"").filter(Boolean):[],_=Array.isArray((C=a==null?void 0:a.xtern_profile)==null?void 0:C.skills)?(I=a==null?void 0:a.xtern_profile)==null?void 0:I.skills:[],c=u.length?u:j.length?j:_;return!c||c.length===0?null:e.jsxs("div",{children:[e.jsx("span",{className:"block text-sm text-gray-700 font-medium mb-1",children:"Skills:"}),e.jsx("div",{className:"flex flex-wrap gap-3",children:c.map((f,X)=>e.jsx(R,{variant:"outline",className:"rounded-full px-3 py-1 text-sm bg-white/70 border-violet-200 text-violet-800 shadow hover:scale-105 transition-transform font-semibold",children:f},X))})]})})()})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 pt-10",children:[a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(D,{onClick:()=>n(a.id),variant:"default",className:"flex-1 flex items-center justify-center h-14 text-lg rounded-xl font-bold bg-black text-white hover:bg-primary/90 shadow-md transition",children:[e.jsx(ne,{className:"h-6 w-6 mr-2"}),"Accept"]}),e.jsxs(D,{onClick:()=>x(a.id),variant:"destructive",className:"flex-1 flex items-center justify-center h-14 text-lg rounded-xl font-bold shadow-md transition",children:[e.jsx(me,{className:"h-6 w-6 mr-2"}),"Reject"]})]}),e.jsx(D,{variant:"outline",onClick:r,className:"flex-1 flex items-center justify-center h-14 text-lg rounded-xl font-medium border-gray-300 shadow",children:"Close"})]})]})]})})})};function qe(){const[a,r]=F.useState([]),[n,x]=F.useState(!0),[b,l]=F.useState(null),{toast:g}=Ae(),y=async()=>{x(!0);try{const{data:{user:i}}=await N.auth.getUser();if(!i)return;const{data:o}=await N.from("tech_leads").select("id").eq("user_id",i.id).single();if(!o)return;const{data:h,error:w}=await N.from("tech_lead_applications").select(` 7 *, 8 projects ( 9 title 10 ) 11 `).eq("tech_lead_id",o.id).order("applied_at",{ascending:!1});if(w)throw w;const k=(h||[]).map(s=>({...s,source:"tech_lead"})),[{data:E,error:L},{data:u,error:p}]=await Promise.all([N.from("pods").select("id, project_id").eq("tech_lead_id",o.id),N.from("multilateral_pod_tech_lead_invitations").select("pod_id").eq("invited_tech_lead_id",o.id).eq("status","accepted")]);if(L||p)throw L||p;const j=(u||[]).map(s=>s.pod_id),{data:_,error:c}=j.length?await N.from("pods").select("id, project_id").in("id",j):{data:[],error:null};if(c)throw c;const d=[...E||[],..._||[]].filter((s,t,S)=>S.findIndex($=>$.id===s.id)===t);console.log("Tech lead pods:",d);const A=(d==null?void 0:d.map(s=>s.project_id))||[],T=new Set((d||[]).map(s=>s.id));console.log("Project IDs from pods:",A);let C=[],I=null;if(A.length>0){const s=await N.from("project_applications").select(` 12 *, 13 projects ( 14 title 15 )
16 `).in("project_id",A).eq("status","pending").order("applied_at",{ascending:!1});C=(s.data||[]).filter(t=>!t.pod_id||T.has(t.pod_id)),I=s.error,console.log("Pod applications found:",C)}if(I)throw I;const f=(C||[]).map(s=>({...s,tech_lead_id:o.id,applicant_id:s.user_id,cover_letter:s.motivation||"",application_data:{fullName:"",email:"",skills:[],eiScore:0,role:s.pathway_role||"",bio:"",location:"",githubUrl:"",linkedinUrl:"",portfolioUrl:"",totalExperience:0,completedProjects:[]},source:"pod"})),pe=[...k,...f],xe=await Promise.all((pe||[]).map(async s=>{var V,W,J,Y,K,Q,Z,G,ee,ae,te,se,re;const{data:t}=await N.from("xterns_profiles").select("*").eq("user_id",s.applicant_id).single();let S=null;try{const{data:m,error:fe}=await N.functions.invoke("fetch-dareyscore-score",{body:{user_id:s.applicant_id}});!fe&&m&&(S={score:m.score,score_breakdown:m.score_breakdown,calculated_at:((V=m.score_breakdown)==null?void 0:V.calculated_at)||new Date().toISOString()})}catch(m){console.warn(`Failed to fetch score for applicant ${s.applicant_id}:`,m)}const $=(S==null?void 0:S.score)!==void 0?Number(S.score):void 0,{data:U}=await N.from("public_profiles_v").select("avatar_url, full_name").eq("id",s.applicant_id).single(),he=(t==null?void 0:t.avatar_url)||(U==null?void 0:U.avatar_url)||null,B=t==null?void 0:t.skill_proficiencies,H=Array.isArray(B)?B.map(m=>typeof m=="string"?m:(m==null?void 0:m.name)??(m==null?void 0:m.skill)??"").filter(m=>!!m):[],ue={...s.application_data&&typeof s.application_data=="object"?s.application_data:{},eiScore:$??(t==null?void 0:t.ei_score)??((W=s.application_data)==null?void 0:W.eiScore)??0,skills:H.length?H:(t==null?void 0:t.skills)||((J=s.application_data)==null?void 0:J.skills)||[],fullName:(t==null?void 0:t.full_name)||((Y=s.application_data)==null?void 0:Y.fullName)||(U==null?void 0:U.full_name)||"",email:(t==null?void 0:t.email)||((K=s.application_data)==null?void 0:K.email)||"",location:(t==null?void 0:t.location)||((Q=s.application_data)==null?void 0:Q.location)||"",githubUrl:(t==null?void 0:t.github_url)||((Z=s.application_data)==null?void 0:Z.githubUrl)||"",linkedinUrl:(t==null?void 0:t.linkedin_url)||((G=s.application_data)==null?void 0:G.linkedinUrl)||"",portfolioUrl:(t==null?void 0:t.portfolio_url)||((ee=s.application_data)==null?void 0:ee.portfolioUrl)||"",role:(t==null?void 0:t.role)||((ae=s.application_data)==null?void 0:ae.role)||"",bio:(t==null?void 0:t.bio)||((te=s.application_data)==null?void 0:te.bio)||"",totalExperience:((se=s.application_data)==null?void 0:se.totalExperience)||0,completedProjects:((re=s.application_data)==null?void 0:re.completedProjects)||[]};return{...s,application_data:ue,xtern_profile:{...t,avatar_url:he},ei_score_data:S?{...S,score:$??0}:void 0}}));r(xe)}catch(i){const o=i instanceof Error?i.message:"Failed to fetch invitations.";console.error("Error loading invitations:",i),g({title:"Error loading invitations",description:o,variant:"destructive"})}finally{x(!1)}},v=async(i,o)=>{try{const h=a.find(k=>k.id===i);if(!h)throw new Error("Application not found");let w;if(h.source==="pod"?w=(h.pod_id&&h.pathway_role?await N.rpc("review_multilateral_pod_application",{_application_id:i,_status:o}):await N.from("project_applications").update({status:o,reviewed_at:new Date().toISOString()}).eq("id",i)).error:w=(await N.from("tech_lead_applications").update({status:o,reviewed_at:new Date().toISOString()}).eq("id",i)).error,w)throw w;g({title:`Invitation ${o}`,description:o==="accepted"?"You accepted the invitation.":"You rejected the invitation."}),y(),l(null)}catch(h){console.error("Respond action failed:",h),g({title:"Action Failed",description:h instanceof Error?h.message:"Failed to respond.",variant:"destructive"})}};return F.useEffect(()=>{y()},[]),e.jsxs("div",{children:[e.jsxs(P,{className:"overflow-hidden rounded-[24px] border border-slate-200/80 bg-white shadow-[0_18px_55px_rgba(15,23,42,0.05)]",children:[e.jsx(de,{className:"border-b border-slate-100 p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-slate-100 text-xterns-navy",children:e.jsx(q,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-950",children:"Incoming Invitations"}),e.jsx(ce,{className:"mt-1 text-sm text-slate-600",children:"Review invitations from Xterns who want to collaborate with you."})]})]})}),e.jsx(z,{className:"p-6",children:n?e.jsx("div",{className:"rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-6 text-sm text-slate-500",children:"Loading invitations..."}):a.length===0?e.jsxs("div",{className:"rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-6 text-center",children:[e.jsx("div",{className:"mx-auto mb-3 flex h-11 w-11 items-center justify-center rounded-2xl bg-white text-xterns-navy shadow-sm",children:e.jsx(q,{className:"h-5 w-5"})}),e.jsx("p",{className:"font-semibold text-slate-950",children:"No pending invitations"}),e.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"New Xtern collaboration requests will appear here."})]}):e.jsx("div",{className:"space-y-3",children:a.map(i=>e.jsx(Fe,{invitation:i,onViewDetails:l,onAccept:o=>v(o,"accepted"),onReject:o=>v(o,"rejected")},i.id))})})]}),e.jsx(Re,{selected:b,onClose:()=>l(null),onAccept:i=>v(i,"accepted"),onReject:i=>v(i,"rejected")})]})}const le=a=>{const r=Ie.find(n=>n.id===a);return(r==null?void 0:r.name)||a},$e=["January","February","March","April","May","June","July","August","September","October","November","December"],Me=a=>
16{const r=["th","st","nd","rd"],n=a%100;return`${a}${r[(n-20)%10]||r[n]||r[0]}`},ie=a=>{if(!a)return null;const r=new Date(a);return Number.isNaN(r.getTime())?null:`${Me(r.getUTCDate())} ${$e[r.getUTCMonth()]} ${r.getUTCFullYear()}`},Oe=a=>a==="accepted"?"default":a==="declined"?"destructive":"secondary",Pe=(a,r)=>{if(!Array.isArray(a))return;const n=a.find(x=>String((x==null?void 0:x.title)||"").toLowerCase().includes(r));return n==null?void 0:n.items},M=(a,r,n,x)=>{const b=Pe(a,n);if(Array.isArray(b)&&b.length>0)return b;const l=r==null?void 0:r[x];return Array.isArray(l)&&l.length>0?l:[]},O=a=>!a||a.length===0?e.jsx("p",{className:"mt-1 text-sm italic text-muted-foreground",children:"Not provided yet."}):e.jsx("ul",{className:"mt-1 list-disc space-y-1 pl-5 text-sm text-muted-foreground",children:a.slice(0,6).map((r,n)=>e.jsx("li",{children:String(r)},`${String(r)}-${n}`))}),ze=()=>{const{invitations:a,isLoading:r,respondToInvitation:n}=Ue(),x=a.filter(l=>l.status==="pending"),b=x.length>0?x:a.slice(0,3);return e.jsxs(P,{className:"overflow-hidden rounded-[24px] border border-slate-200/80 bg-white shadow-[0_18px_55px_rgba(15,23,42,0.05)]",children:[e.jsx(de,{className:"border-b border-slate-100 p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-emerald-50 text-emerald-700",children:e.jsx(q,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx(Ce,{className:"text-lg font-semibold text-slate-950",children:"Multilateral Pod Collaboration Invites"}),e.jsx(ce,{className:"mt-1 text-sm text-slate-600",children:"Review pathway-level tech lead invitations from pod owners and super admins, then accept or decline."})]})]})}),e.jsx(z,{className:"p-6",children:r?e.jsx("div",{className:"rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-6 text-sm text-slate-500",children:"Loading multilateral collaboration invitations..."}):b.length===0?e.jsxs("div",{className:"rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-6 text-center",children:[e.jsx("div",{className:"mx-auto mb-3 flex h-11 w-11 items-center justify-center rounded-2xl bg-white text-emerald-700 shadow-sm",children:e.jsx(q,{className:"h-5 w-5"})}),e.jsx("p",{className:"font-semibold text-slate-950",children:"No multilateral pod invitations"}),e.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Pathway-level collaboration requests will appear here."})]}):e.jsx("div",{className:"space-y-4",children:b.map(l=>{var u,p,j,_,c,d,A,T,C,I,f;const g=l.invitation_context||{},y=g.projectContent||{},v=(p=(u=l.pods)==null?void 0:u.projects)==null?void 0:p.project_content,i=le(l.pathway),o=((_=(j=l.pods)==null?void 0:j.projects)==null?void 0:_.title)||g.projectTitle||"this project",h=g.podName||((c=l.pods)==null?void 0:c.pod_name),w=M(v,y,"business problem","businessProblemStatement"),k=M(v,y,"objective","projectObjectives"),E=M(v,y,"scope","scopeOfWork"),L=M(v,y,"evaluation","evaluationCriteria");return e.jsxs("div",{className:"rounded-[20px] border border-slate-200/80 bg-white p-5 shadow-sm transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_18px_45px_rgba(15,23,42,0.08)]",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h4",{className:"font-semibold text-slate-950",children:h}),e.jsx(R,{variant:Oe(l.status),className:"rounded-full",children:l.status})]}),e.jsx("p",{className:"mt-1 text-sm text-slate-600",children:o})]}),l.status==="pending"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(D,{size:"sm",onClick:()=>n(l,"accepted"),className:"rounded-full bg-xterns-navy text-white hover:bg-xterns-navy2",children:[e.jsx(oe,{className:"mr-2 h-4 w-4"}),"Accept"]}),e.jsxs(D,{size:"sm",variant:"outline",onClick:()=>n(l,"declined"),className:"rounded-full border-slate-200 text-slate-700 hover:bg-slate-50",children:[e.jsx(me,{className:"mr-2 h-4 w-4"}),"Decline"]})]})]}),e.jsx("div",{className:"mt-4 rounded-2xl border border-emerald-200 bg-emerald-50 p-4",children:e.jsxs("p",{className:"text-sm text-emerald-900",children:["You've been invited as the ",e.jsx("strong",{children:"Tech Lead"})," for the"," ",e.jsx("strong",{children:i})," pathway on ",e.jsx("strong",{children:o}),". If you accept, you'll co-lead this pathway alongside the other pod tech leads with access to the shared workspace, sprint board, and pod members."]})}),l.message&&e.jsxs("p",{className:"mt-3 rounded-2xl bg-slate-50 p-4 text-sm italic text-slate-600",children:['"',l.message,'"']}),e.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-2xl bg-slate-50 p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-slate-950",children:"Timeline"}),e.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:[ie(((d=g.timeline)==null?void 0:d.startDate)||((A=l.pods)==null?void 0:A.project_start_date))||"Start date pending"," to"," ",ie(((T=g.timeline)==null?void 0:T.completionDeadline)||((C=l.pods)==null?void 0:C.completion_deadline))||"completion pending"]})]}),e.jsxs("div",{className:"rounded-2xl bg-slate-50 p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-slate-950",children:"Participating pathways"}),e.jsx("p",{className:"mt-1 text-sm text-slate-600",children:(g.participatingPathways||((f=(I=l.pods)==null?void 0:I.projects)==null?void 0:f.career_paths)||[]).map(le).join(", ")})]})]}),e.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-slate-950",children:"Business problem"}),O(w)]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-slate-950",children:"Project objectives"}),O(k)]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-slate-950",children:"Scope of work"}),O(E)]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-slate-950",children:"Evaluation criteria"}),O(L)]})]})]},l.id)})})})]})};function ma(){return e.jsx(Se,{children:e.jsxs("div",{className:"flex min-h-screen w-full bg-[#F8FAFC] font-['Inter',sans-serif]",children:[e.jsx(De,{}),e.jsxs(Le,{className:"flex-1",children:[e.jsx(Ee,{title:"Invitations from Xterns"}),e.jsxs("main",{className:"mx-auto w-full max-w-[1280px] space-y-6 px-4 py-6 sm:px-6 lg:px-8",children:[e.jsx("section",{className:"rounded-[24px] border border-slate-200/80 bg-white p-6 shadow-[0_18px_55px_rgba(15,23,42,0.05)]",children:e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs(R,{className:"mb-4 rounded-full bg-slate-100 px-3 py-1 text-xs font-semibold text-xterns-navy hover:bg-slate-100",children:[e.jsx(q,{className:"mr-1.5 h-3.5 w-3.5"}),"Collaboration inbox"]}),e.jsx("h1",{className:"text-3xl font-bold tracking-tight text-slate-950",children:"Review Tech Lead Invitations"}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-slate-600",children:"Manage pathway collaboration requests and incoming Xtern applications from one focused workspace."})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-600",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold text-slate-950",children:[e.jsx(ne,{className:"h-4 w-4 text-emerald-600"}),"Review actions stay in sync"]}),e.jsx("p",{className:"mt-1 max-w-sm",children:"Accepted invitations unlock pod collaboration, sprint access, and shared delivery workflows."})]})]})}),e.jsx(ze,{}),e.jsx(qe,{}),e.jsx(P,{className:"overflow-hidden rounded-[24px] border border-slate-200/80 bg-white shadow-[0_18px_55px_rgba(15,23,42,0.05)]",children:e.jsx(z,{className:"p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-emerald-50 text-emerald-700",children:e.jsx(Te,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-950",children:"Collaborative Kickoff Workflow"}),e.jsx("p",{className:"mt-1 text-sm leading-6 text-slate-600",children:"When you accept an invitation, the platform helps you and Xterns define project scope, assign roles, and launches your first sprint with a smart template."})]})]})})})]})]})]})})}export{ma as default};
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.