1import{a as f,r as l,j as e,T as g,L as j}from"./index-CKRizoQT.js";import{B as n}from"./Button-2xVWwAgv.js";import{C as y,a as p,d as E}from"./Card-QoI4SUmU.js";import{u as w}from"./useTranslation-CnBUce51.js";import{R as b}from"./refresh-cw-DqkqzwTh.js";import{A as N}from"./arrow-left-azrDO_3H.js";const i={fetch_failed:{titleKey:"authError.fetch_failed.title",descKey:"authError.fetch_failed.desc"},oauth_error:{titleKey:"authError.oauth_error.title",descKey:"authError.oauth_error.desc"},oauth_failed:{titleKey:"authError.oauth_error.title",descKey:"authError.oauth_error.desc"},no_code:{titleKey:"authError.no_code.title",descKey:"authError.no_code.desc"},access_denied:{titleKey:"authError.oauth_error.title",descKey:"authError.oauth_error.desc"},default:{titleKey:"authError.default.title",descKey:"authError.default.desc"}};function k(){const{t:r}=w(),[s]=f(),[t,d]=l.useState(10),o=s.get("error")||"default",c=i[o]||i.default,a=s.get("return")||"/auth/login",u=r(c.titleKey,{}),h=r(c.descKey,{});return l.useEffect(()=>{if(t<=0){window.location.href=a;return}const m=setTimeout(()=>d(x=>x-1),1e3);return()=>clearTimeout(m)},[t,a]),e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-red-50 to-orange-50 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8",children:e.jsx("div",{className:"max-w-md w-full",children:e.jsxs(y,{children:[e.jsxs(p,{className:"text-center",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("img",{src:"/logo.png",alt:"SkoolTranslate Logo",className:"h-16 w-auto"})}),e.jsx("div",{className:"mx-auto flex items-center justify-center h-14 w-14 rounded-full bg-red-100 mb-4",children:e.jsx(g,{className:"h-7 w-7 text-red-600"})}),e.jsx("h1",{className:"text-xl font-bold text-gray-900",children:u})]}),e.jsxs(E,{children:[e.jsx("p",{className:"text-gray-600 text-center mb-6",children:h}),o==="fetch_failed"&&e.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 mb-6",children:e.jsx("p",{className:"text-sm text-amber-800 text-center",children:r("authError.tempIssue",{})})}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs(n,{onClick:()=>window.location.href=a,className:"w-full bg-orange-500 hover:bg-orange-600 text-white",children:[e.jsx(b,{className:"w-4 h-4 mr-2"}),r("authError.tryAgain",{})]}),e.jsx(j,{to:"/",className:"block",children:e.jsxs(n,{variant:"outline",className:"w-full",children:[e.jsx(N,{className:"w-4 h-4 mr-2"}),r("authError.backHome",{})]})})]}),e.jsx("p",{className:"text-xs text-gray-400 text-center mt-6",children:r("authError.redirecting",{},`Redirecting automatically in ${t}s...`).replace("{countdown}",String(t))})]})]})})})}export{k 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.