1import{j as e}from"./ui-vendor.Bttg0WQS.js";import{u as s,r as t}from"./react-vendor.Bh_5QG34.js";import{ai as a}from"./auth.BMZZxzVi.js";import{U as r,L as l,a as n,E as o,e as d}from"./icons-vendor.7YDAcAiV.js";import"./utils-vendor.P5LfM8Ka.js";const i=()=>{const i=s(),[c,{isLoading:m}]=a(),[x,f]=t.useState({email:"",password:""}),[p,u]=t.useState(!1),[h,b]=t.useState(""),j=e=>{const{name:s,value:t}=e.target;f(e=>({...e,[s]:t}))};return e.jsx("div",{className:"min-h-screen bg-[#f8f9fa] flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"w-16 h-16 bg-[#22beff] rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(r,{className:"w-8 h-8 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-[#202124]",children:"Mentor Support Login"}),e.jsx("p",{className:"text-[#5f6368] mt-2",children:"Access your support dashboard"})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-[#dbdcdf] p-6",children:[e.jsxs("form",{onSubmit:async e=>{var s;e.preventDefault(),b("");try{const e=await c({email:x.email,password:x.password}).unwrap();e.data&&e.data.token?(localStorage.setItem("mentorToken",e.data.token),localStorage.setItem("mentorInfo",JSON.stringify(e.data.mentor)),i("/mentor-test")):b("Login failed: Invalid response format")}catch(t){b((null==(s=t.data)?void 0:s.message)||t.message||"Login failed. Please try again.")}},className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[#202124] mb-2",children:"Email Address"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"email",name:"email",value:x.email,onChange:j,required:!0,className:"w-full px-3 py-2 pl-10 border border-[#dbdcdf] rounded-lg focus:outline-none focus:ring-2 focus:ring-[#22beff] focus:border-transparent",placeholder:"[email protected]"}),e.jsx(r,{className:"w-4 h-4 text-[#5f6368] absolute left-3 top-1/2 transform -translate-y-1/2"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[#202124] mb-2",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:p?"text":"password",name:"password",value:x.password,onChange:j,required:!0,className:"w-full px-3 py-2 pl-10 pr-10 border border-[#dbdcdf] rounded-lg focus:outline-none focus:ring-2 focus:ring-[#22beff] focus:border-transparent",placeholder:"Enter your password"}),e.jsx(l,{className:"w-4 h-4 text-[#5f6368] absolute left-3 top-1/2 transform -translate-y-1/2"}),e.jsx("button",{type:"button",onClick:()=>u(!p),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-[#5f6368] hover:text-[#202124]",children:p?e.jsx(n,{className:"w-4 h-4"}):e.jsx(o,{className:"w-4 h-4"})})]})]}),h&&e.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("p",{className:"text-sm text-red-600",children:h})}),e.jsxs("button",{type:"submit",disabled:m,className:"w-full flex items-center justify-center gap-2 px-4 py-2 bg-[#22beff] text-white rounded-lg font-medium hover:bg-[#22beff]/80 transition-colors disabled:opacity-50",children:[m?e.jsx(d,{className:"w-4 h-4 animate-spin"}):null,m?"Signing in...":"Sign In"]})]}),e.jsxs("div",{className:"mt-6 p-4 bg-[#f8f9fa] rounded-lg",children:[e.jsx("p",{className:"text-sm font-medium text-[#202124] mb-2",children:"Demo Credentials:"}),e.jsxs("div",{className:"text-sm text-[#5f6368] space-y-1",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Email:"})," [email protected]"]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Password:"})," password123"]})]})]})]}),e.jsx("div",{className:"text-center mt-6",children:e.jsx("p",{className:"text-sm text-[#5f6368]",children:"Need help? Contact support"})})]})})};export{i 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.