import{c as m,a3 as x,r as i,j as e,S as u,L as l,B as n,a6 as h}from"./index-CJ26T8nM.js";import{B as p}from"./BreadcrumbNavigation-DO0Fhgk5.js";import{B as c}from"./book-open-BvNhhTAV.js";import{S as g}from"./search-_DyM0Qzb.js";import{A as b}from"./arrow-left-CfPT7QuA.js";const y=()=>{const{t:s}=m("notfound"),r=x(),[o,d]=i.useState([]);return i.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",r.pathname);const t=r.pathname.toLowerCase(),a=[];t.includes("story")&&a.push("stories"),t.includes("read")&&a.push("reading-cart"),t.includes("progress")&&a.push("progress"),t.includes("vocab")&&a.push("vocabulary"),t.includes("about")&&a.push("about"),t.includes("contact")&&a.push("contact"),(t.includes("subscription")||t.includes("subscribe"))&&a.push("subscription"),d(a.slice(0,3))},[r.pathname]),e.jsxs(e.Fragment,{children:[e.jsx(u,{title:s("meta.title"),description:s("meta.description"),noIndex:!0}),e.jsxs("div",{className:"container px-4 md:px-6 py-8 max-w-4xl mx-auto",children:[e.jsx(p,{items:[{name:"Home",path:"/"},{name:"404 Error",path:r.pathname}]}),e.jsxs("div",{className:"text-center max-w-2xl mx-auto",children:[e.jsx("div",{className:"mb-8 flex justify-center",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-6 rounded-full bg-nature-coral opacity-30 blur-xl animate-pulse"}),e.jsx("div",{className:"relative bg-gradient-to-br from-nature-coral to-nature-red p-6 rounded-full",children:e.jsx(c,{className:"h-16 w-16 text-white"})})]})}),e.jsx("h1",{className:"text-7xl font-bold mb-4 bg-gradient-to-r from-nature-red to-nature-coral bg-clip-text text-transparent",children:"404"}),e.jsx("h2",{className:"text-3xl font-semibold mb-4 text-nature-red",children:s("heading.main")}),e.jsx("p",{className:"text-lg text-nature-green mb-2",children:s("heading.description")}),e.jsxs("p",{className:"text-sm text-muted-foreground mb-8",children:[s("heading.attemptedPath")," ",e.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs",children:r.pathname})]}),o.length>0&&e.jsxs("div",{className:"mb-8 p-4 bg-nature-yellow/10 rounded-xl border border-nature-yellow/20",children:[e.jsxs("h3",{className:"text-sm font-medium text-nature-green mb-3 flex items-center gap-2",children:[e.jsx(g,{className:"h-4 w-4"}),s("suggestions.title")]}),e.jsx("div",{className:"flex flex-wrap gap-2 justify-center",children:o.map(t=>e.jsx(l,{to:`/${t}`,children:e.jsx(n,{variant:"outline",size:"sm",className:"border-nature-teal text-nature-teal hover:bg-nature-teal/10",children:t.charAt(0).toUpperCase()+t.slice(1).replace("-"," ")})},t))})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[e.jsx(l,{to:"/",children:e.jsxs(n,{size:"lg",className:"bg-nature-teal hover:bg-nature-teal/80 text-white flex items-center gap-2",children:[e.jsx(h,{className:"h-5 w-5"}),s("buttons.returnHome")]})}),e.jsx(l,{to:"/stories",children:e.jsxs(n,{size:"lg",variant:"outline",className:"border-nature-coral text-nature-coral hover:bg-nature-coral/10 flex items-center gap-2",children:[e.jsx(c,{className:"h-5 w-5"}),s("buttons.exploreStories")]})}),e.jsxs(n,{size:"lg",variant:"ghost",onClick:()=>window.history.back(),className:"text-nature-green hover:bg-nature-green/10 flex items-center gap-2",children:[e.jsx(b,{className:"h-5 w-5"}),s("buttons.goBack")]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-6 shadow-md border border-gray-100",children:[e.jsx("h3",{className:"text-lg font-semibold text-nature-red mb-3",children:s("help.title")}),e.jsx("p",{className:"text-nature-green mb-4",children:s("help.description")}),e.jsx(l,{to:"/contact",children:e.jsx(n,{variant:"outline",className:"border-nature-green text-nature-green hover:bg-nature-green/10",children:s("help.contactSupport")})})]})]})]})]})};export{y as default};
//# sourceMappingURL=NotFound-Xq5bE7y2.js.map