1import{bw as L,av as e,bf as r,bz as f}from"./index-CfKUo6Nv.js";import{d as I,r as c,L as o}from"./vendor-DgCdqP9t.js";import{L as x}from"./Layout-i50GIwzG.js";import{P as q}from"./PageSeo-SpiJuD5d.js";import{B as g}from"./button-ChrJM-gB.js";import{d as k,a as P,q as R,c as U,o as B,l as F,g as H}from"./firebase-cy9q6dya.js";import{d as j}from"./firebase-YNC7CcS9.js";import{G as d}from"./graduation-cap-D2tnbPOA.js";import{A as _}from"./arrow-left-CUpkM22V.js";import{A as $}from"./arrow-right-CmnDR0j9.js";import{C as w}from"./chevron-right-B4cyv5Fx.js";import{A as y}from"./award-CaydH15h.js";import{S as V}from"./star-DRlRN-Qy.js";import{C as z}from"./firestoreCache-BrO_29RR.js";import{P as b}from"./plane-DSZ3-E7t.js";import{Q}from"./quote-DKh7bg2-.js";import"./x-M1NpRWRZ.js";import"./createLucideIcon-C8rAFh4E.js";import"./index-C4kMsXMw.js";const N=({delay:i=0,className:t=""})=>e.jsx(r.div,{className:`absolute text-white/10 ${t}`,initial:{x:"-100%",y:0},animate:{x:"200%",y:[0,-15,0,15,0]},transition:{x:{duration:20,repeat:1/0,delay:i,ease:"linear"},y:{duration:5,repeat:1/0,ease:"easeInOut"}},children:e.jsx(b,{className:"w-6 h-6 rotate-[-35deg]"})}),me=()=>{const{id:i}=I(),{t,direction:h}=L(),[a,v]=c.useState(null),[u,A]=c.useState([]),[E,S]=c.useState(!0),p=h==="rtl"?_:$;c.useEffect(()=>{(async()=>{if(i){try{const n=k(j,"graduates",i),m=await P(n);m.exists()&&v({id:m.id,...m.data()});const G=R(U(j,"graduates"),B("graduationDate","desc"),F(4)),D=(await H(G)).docs.map(l=>({id:l.id,...l.data()})).filter(l=>l.id!==i&&l.published!==!1).slice(0,3);A(D)}catch{}S(!1)}})()},[i]);const C=s=>new Date(s).toLocaleDateString(h==="rtl"?"ar-SA":"en-US",{year:"numeric",month:"long"});return E?e.jsx(x,{children:e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsx(r.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:e.jsx(d,{className:"w-12 h-12 text-primary"})})})}):a?e.jsxs(x,{children:[e.jsx(q,{pageKey:`graduate-${a.id}`,path:`/graduates/${a.id}`,defaultTitleAr:a.nameAr,defaultTitleEn:a.nameEn,defaultDescriptionAr:f(a.storyAr||a.titleAr||"",155),defaultDescriptionEn:f(a.storyEn||a.titleEn||"",155),image:a.imageUrl,breadcrumbs:[{name:t("Ø§ÙØ±Ø¦ÙØ³ÙØ©","Home"),path:"/"},{name:t("ÙØ¬ÙÙ
Ø§ÙØ·ÙراÙ","Flying Stars"),path:"/graduates"},{name:t(a.nameAr,a.nameEn),path:`/graduates/${a.id}`}]}),e.jsxs("section",{className:"relative bg-gradient-to-br from-aviation-navy via-aviation-navy to-primary overflow-hidden pt-24 pb-32",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx(r.div,{className:"absolute top-20 right-20 w-96 h-96 bg-secondary/20 rounded-full blur-[120px]",animate:{scale:[1,1.2,1],opacity:[.3,.5,.3]},transition:{duration:8,repeat:1/0}}),e.jsx(N,{delay:0,className:"top-[30%]"}),e.jsx(N,{delay:7,className:"top-[60%]"}),e.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(255,255,255,0.02)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.02)_1px,transparent_1px)] bg-[size:50px_50px]"})]}),e.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[e.jsx(r.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex items-center justify-end gap-2 mb-8",children:e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm border border-white/20 rounded-full px-4 py-2 flex items-center gap-2 text-sm",children:[e.jsx(o,{to:"/",className:"text-white/70 hover:text-white transition-colors",children:t("Ø§ÙØ±Ø¦ÙØ³ÙØ©","Home")}),e.jsx(w,{className:"w-4 h-4 text-white/50"}),e.jsx(o,{to:"/graduates",className:"text-white/70 hover:text-white transition-colors",children:t("ÙØ¬ÙÙ
Ø§ÙØ·ÙراÙ","Flying Stars")}),e.jsx(w,{className:"w-4 h-4 text-white/50"}),e.jsx("span",{className:"font-medium text-white",children:t(a.nameAr,a.nameEn)})]})}),e.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[e.jsxs(r.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.5},className:"relative",children:[e.jsx("div",{className:"relative aspect-square max-w-md mx-auto rounded-3xl overflow-hidden border-4 border-white/20 shadow-2xl",children:a.imageUrl?e.jsx("img",{src:a.imageUrl,alt:t(a.nameAr,a.nameEn),className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full bg-white/10 flex items-center justify-center",children:e.jsx(d,{className:"w-32 h-32 text-white/30"})})}),e.jsx(r.div,{className:"absolute -top-4 -right-4 w-20 h-20 bg-secondary rounded-2xl flex items-center justify-center shadow-lg",animate:{rotate:[0,10,0]},transition:{duration:4,repeat:1/0},children:e.jsx(d,{className:"w-10 h-10 text-secondary-foreground"})}),e.jsx(r.div,{className:"absolute -bottom-4 -left-4 w-16 h-16 bg-primary rounded-2xl flex items-center justify-center shadow-lg",animate:{rotate:[0,-10,0]},transition:{duration:4,repeat:1/0,delay:1},children:e.jsx(y,{className:"w-8 h-8 text-primary-foreground"})})]}),e.jsxs(r.div,{initial:{opacity:0,x:30}
1,animate:{opacity:1,x:0},transition:{duration:.5,delay:.2},className:"text-white",children:[a.featured&&e.jsxs("div",{className:"inline-flex items-center gap-2 bg-secondary text-white px-4 py-2 rounded-full text-sm font-medium mb-4",children:[e.jsx(V,{className:"w-4 h-4 fill-current"}),t("Ø®Ø±ÙØ¬ Ù
Ù
ÙØ²","Featured Graduate")]}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4",children:t(a.nameAr,a.nameEn)}),e.jsx("p",{className:"text-white text-xl mb-6",children:t(a.titleAr,a.titleEn)}),e.jsxs("div",{className:"flex flex-wrap gap-4 text-white/70 mb-8",children:[e.jsxs("span",{className:"flex items-center gap-2 bg-white/10 px-4 py-2 rounded-full",children:[e.jsx(z,{className:"w-4 h-4"}),C(a.graduationDate)]}),a.program&&e.jsxs("span",{className:"flex items-center gap-2 bg-white/10 px-4 py-2 rounded-full",children:[e.jsx(b,{className:"w-4 h-4"}),a.program]})]}),a.quoteAr&&e.jsxs("div",{className:"relative bg-white/10 backdrop-blur-sm rounded-2xl p-6 border border-white/20",children:[e.jsx(Q,{className:"absolute -top-3 -start-3 w-10 h-10 text-white"}),e.jsxs("p",{className:"text-white text-lg italic leading-relaxed",children:['"',t(a.quoteAr,a.quoteEn),'"']})]})]})]})]}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0",children:e.jsx("svg",{viewBox:"0 0 1440 80",fill:"none",className:"w-full h-[60px] md:h-[80px]",preserveAspectRatio:"none",children:e.jsx("path",{d:"M0 80L60 72C120 64 240 48 360 40C480 32 600 32 720 37.3C840 43 960 53 1080 58.7C1200 64 1320 64 1380 64L1440 64V80H1380C1320 80 1200 80 1080 80C960 80 840 80 720 80C600 80 480 80 360 80C240 80 120 80 60 80H0Z",fill:"hsl(var(--background))"})})})]}),(a.storyAr||a.storyEn)&&e.jsx("section",{className:"py-16 bg-background",children:e.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:e.jsxs(r.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"bg-card rounded-3xl border shadow-xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-primary/10 to-secondary/10 px-8 py-6 border-b border-border/50",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/20 flex items-center justify-center",children:e.jsx(y,{className:"w-6 h-6 text-primary"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-foreground",children:t("ÙØµØ© اÙÙØ¬Ø§Ø","Success Story")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t(a.nameAr,a.nameEn)})]})]})}),e.jsx("div",{className:"p-8 md:p-12",children:e.jsx("p",{className:"text-foreground text-lg leading-relaxed whitespace-pre-wrap",children:t(a.storyAr,a.storyEn)})})]})})}),u.length>0&&e.jsx("section",{className:"py-16 bg-muted/30",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx("div",{className:"text-center mb-12",children:e.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:t("اÙÙ
Ø²ÙØ¯ Ù
Ù ÙØ¬ÙÙ
Ø§ÙØ·ÙراÙ","More Flying Stars")})}),e.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-5xl mx-auto",children:u.map((s,n)=>e.jsx(r.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:n*.1},children:e.jsx(o,{to:`/graduates/${s.id}`,children:e.jsxs("div",{className:"group bg-card rounded-2xl overflow-hidden border shadow-soft hover:shadow-xl transition-all hover:-translate-y-2",children:[e.jsx("div",{className:"aspect-square overflow-hidden",children:s.imageUrl?e.jsx("img",{src:s.imageUrl,alt:t(s.nameAr,s.nameEn),className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}):e.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:e.jsx(d,{className:"w-16 h-16 text-muted-foreground/30"})})}),e.jsxs("div",{className:"p-5",children:[e.jsx("h3",{className:"font-bold text-foreground group-hover:text-primary transition-colors",children:t(s.nameAr,s.nameEn)}),e.jsx("p",{className:"text-sm text-primary",children:t(s.titleAr,s.titleEn)})]})]})})},s.id))}),e.jsx("div",{className:"text-center mt-12",children:e.jsx(o,{to:"/graduates",children:e.jsxs(g,{className:"gap-2 rounded-full",children:[t("عرض جÙ
ÙØ¹ Ø§ÙØ®Ø±ÙجÙÙ","View All Graduates"),e.jsx(p,{className:"w-4 h-4"})]})})})]})})]}):e.jsx(x,{children:e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-4",children:[e.jsx(d,{className:"w-20 h-20 text-muted-foreground
1/30"}),e.jsx("p",{className:"text-xl text-muted-foreground",children:t("Ø§ÙØ®Ø±Ùج ØºÙØ± Ù
ÙØ¬Ùد","Graduate not found")}),e.jsx(o,{to:"/graduates",children:e.jsxs(g,{className:"gap-2",children:[e.jsx(p,{className:"w-4 h-4 rotate-180"}),t("Ø§ÙØ¹Ùدة ÙÙØ®Ø±ÙجÙÙ","Back to Graduates")]})})]})})};export{me 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.