import{j as e}from"./jsx-runtime.D_zvdyIk.js";import{r as t}from"./index.DIfZGIpv.js";import{A as b,u as g}from"./AdminAuth.CbzFS552.js";function p(){const{login:d}=g(),[r,c]=t.useState(""),[o,m]=t.useState(""),[n,l]=t.useState(""),[a,i]=t.useState(!1),u=async s=>{s.preventDefault(),l(""),i(!0);const x=await d(r,o);i(!1),x?window.location.href="/admin":l("Ongeldige inloggegevens")};return e.jsx("div",{className:"min-h-screen bg-[#0A0A0A] flex items-center justify-center",children:e.jsxs("div",{className:"w-full max-w-sm",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-[#F5F5F5] mb-1",children:"🔒 SneakerPicks"}),e.jsx("p",{className:"text-sm text-[#999]",children:"Admin Panel"})]}),e.jsxs("form",{onSubmit:u,className:"bg-[#141414] border border-[#333] rounded-xl p-6 space-y-4",children:[n&&e.jsx("div",{className:"bg-[#FF3B3B]/10 text-[#FF3B3B] text-sm px-4 py-2 rounded-lg",children:n}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-[#999] mb-1.5",children:"Email / Username"}),e.jsx("input",{type:"text",value:r,onChange:s=>c(s.target.value),className:"w-full bg-[#0A0A0A] border border-[#333] rounded-lg px-4 py-2.5 text-[#F5F5F5] focus:outline-none focus:border-[#00FF6A] transition-colors",placeholder:"admin",autoFocus:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-[#999] mb-1.5",children:"Password"}),e.jsx("input",{type:"password",value:o,onChange:s=>m(s.target.value),className:"w-full bg-[#0A0A0A] border border-[#333] rounded-lg px-4 py-2.5 text-[#F5F5F5] focus:outline-none focus:border-[#00FF6A] transition-colors",placeholder:"••••••••"})]}),e.jsx("button",{type:"submit",disabled:a,className:"w-full bg-[#00FF6A] text-[#0A0A0A] font-semibold py-2.5 rounded-lg hover:bg-[#00CC55] transition-colors disabled:opacity-50",children:a?"Bezig...":"Inloggen"})]})]})})}function j(){return e.jsx(b,{children:e.jsx(p,{})})}export{j as default};
