1import{d as h,r as s,j as e}from"./index-aUg8wedK.js";import{b as c,i as b}from"./client-u3-PO_J-.js";import{e as f}from"./tslib.es6-EcI8rXm4.js";function w(){const d=h(),[n,m]=s.useState(""),[o,u]=s.useState(""),[r,a]=s.useState(""),[l,i]=s.useState(!1),x=async t=>{t.preventDefault(),a(""),i(!0);const{error:p}=await c.auth.signInWithPassword({email:n,password:o});if(p){a("Neplatné pÅihlaÅ¡ovacà údaje"),i(!1);return}if(!await b()){await c.auth.signOut(),a("Nemáte oprávnÄnà pro pÅÃstup do administrace"),i(!1);return}d({to:"/dashboard"})};return e.jsxs("div",{className:"min-h-screen bg-[#000000] flex flex-col items-center justify-center px-4",children:[e.jsx("img",{src:f,alt:"Rezidence EliÅ¡ky PÅemyslovny",className:"h-10 mb-10 brightness-0 invert"}),e.jsx("h1",{className:"text-white text-xl font-semibold mb-1.5",children:"PÅihlásit se"}),e.jsx("p",{className:"text-zinc-500 text-sm mb-8",children:"Pro pÅihlášenà zadejte své údaje nÞe"}),e.jsxs("form",{onSubmit:x,className:"w-full max-w-sm space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-zinc-400 text-xs font-medium mb-1.5 block",children:"E-mailová adresa"}),e.jsx("input",{type:"email",value:n,onChange:t=>m(t.target.value),placeholder:"[email protected]",required:!0,className:"w-full bg-zinc-900 border border-zinc-800 rounded-lg px-4 py-2.5 text-sm text-white placeholder:text-zinc-600 focus:outline-none focus:border-zinc-600 transition-colors"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-zinc-400 text-xs font-medium mb-1.5 block",children:"Heslo"}),e.jsx("input",{type:"password",value:o,onChange:t=>u(t.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,className:"w-full bg-zinc-900 border border-zinc-800 rounded-lg px-4 py-2.5 text-sm text-white placeholder:text-zinc-600 focus:outline-none focus:border-zinc-600 transition-colors"})]}),r&&e.jsx("p",{className:"text-red-400 text-xs",children:r}),e.jsx("button",{type:"submit",disabled:l,className:"w-full bg-zinc-600 text-white font-medium text-sm py-2.5 rounded-lg hover:bg-zinc-500 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:l?"PÅihlaÅ¡ovánÃ...":"PÅihlásit se"})]}),e.jsx("p",{className:"text-zinc-700 text-xs mt-8",children:"PÅÃstup je omezen pouze na autorizované e-maily."})]})}export{w as component};
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.