import{c as i,u as p,j as e,L as d}from"./index-7mCYgmGq.js";import{u,N as g,a as x}from"./api-DTr_VGP6.js";import{B as c}from"./button-BfkoTqK7.js";import{m as s,B as y}from"./index-C5l5cIjg.js";import{A as f}from"./arrow-right-nW0o5Pc0.js";import{C as j}from"./chart-column-Di9XBjb2.js";/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v=i("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b=i("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const w=i("SquarePlay",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 8 6 4-6 4Z",key:"f1r3lt"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N=i("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),h={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.12}}},r={hidden:{opacity:0,y:30},show:{opacity:1,y:0,transition:{duration:.6}}};function q(){const{isAuthenticated:t}=p(),{data:n}=u({queryKey:["courses"],queryFn:x.getCourses,enabled:t}),{data:o}=u({queryKey:["course-progress-all"],queryFn:x.getAllCourseProgress,enabled:t}),m=o==null?void 0:o.find(a=>a.progress>0&&a.progress<100),l=m?n==null?void 0:n.find(a=>a.id===m.courseId):null;return e.jsxs("div",{className:"min-h-screen bg-background animated-mesh",children:[e.jsx("div",{className:"gradient-orb gradient-orb-1"}),e.jsx("div",{className:"gradient-orb gradient-orb-2"}),e.jsx("div",{className:"gradient-orb gradient-orb-3"}),e.jsx(g,{}),e.jsx("div",{className:"pt-28 pb-20 px-4 relative z-10",children:e.jsxs("div",{className:"container max-w-5xl mx-auto text-center",children:[e.jsxs(s.div,{variants:h,initial:"hidden",animate:"show",children:[e.jsx(s.div,{variants:r,children:e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full glass text-primary text-sm font-medium mb-6",children:[e.jsx(b,{className:"w-4 h-4"}),"The future of math education"]})}),e.jsxs(s.h1,{variants:r,className:"font-heading text-5xl md:text-7xl font-extrabold mb-6 leading-tight",children:["Learn Mathematics",e.jsx("br",{}),e.jsx("span",{className:"text-gradient",children:"The Smart Way"})]}),e.jsx(s.p,{variants:r,className:"text-muted-foreground text-lg md:text-xl max-w-2xl mx-auto mb-10",children:"Interactive courses with beautifully rendered formulas, progress tracking, and a distraction-free learning experience."}),e.jsxs(s.div,{variants:r,className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[l?e.jsx(c,{asChild:!0,size:"lg",className:"rounded-2xl gradient-primary text-primary-foreground border-0 text-base px-8 h-12 shadow-glow w-full sm:w-auto",children:e.jsxs(d,{to:`/courses/${l.id}`,children:[e.jsx(w,{className:"w-5 h-5 mr-2"}),"Continue ",l.title]})}):e.jsx(c,{asChild:!0,size:"lg",className:"rounded-2xl gradient-primary text-primary-foreground border-0 text-base px-8 h-12 shadow-glow w-full sm:w-auto",children:e.jsxs(d,{to:t?"/courses":"/login",children:[t?"My Courses":"Get Started"," ",e.jsx(f,{className:"w-5 h-5 ml-2"})]})}),e.jsx(c,{asChild:!0,variant:"outline",size:"lg",className:"rounded-2xl text-base px-8 h-12 glass w-full sm:w-auto",children:e.jsx(d,{to:t?"/courses":"/login",children:"Explore Courses"})})]})]}),e.jsx(s.div,{variants:h,initial:"hidden",animate:"show",className:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-24",children:[{icon:y,title:"Rich Content",desc:"LaTeX formulas, videos, PDFs, and interactive text content",span:"md:col-span-2"},{icon:N,title:"Instant Feedback",desc:"Track your progress in real-time as you learn",span:""},{icon:v,title:"Structured Learning",desc:"Courses organized into chapters, sections, and subsections",span:""},{icon:j,title:"Track Progress",desc:"Monitor your completion and pick up right where you left off",span:"md:col-span-2"}].map(a=>e.jsxs(s.div,{variants:r,whileHover:{y:-6,scale:1.02},transition:{type:"spring",stiffness:300,damping:20},className:`glass-card rounded-2xl p-6 text-left ${a.span}`,children:[e.jsx("div",{className:"w-11 h-11 rounded-xl gradient-primary flex items-center justify-center mb-4 shadow-glow",children:e.jsx(a.icon,{className:"w-5 h-5 text-primary-foreground"})}),e.jsx("h3",{className:"font-heading font-semibold text-lg mb-2",children:a.title}),e.jsx("p",{className:"text-muted-foreground text-sm",children:a.desc})]},a.title))})]})})]})}export{q as default};
