1import{j as e,c as n,d as c}from"./main-C4bW6TQv.js";import{u}from"./useMutation-BPgN3M9O.js";import{u as m}from"./useForm-D4YTe89d.js";import{a as f}from"./auth-client-fAjfVBoa.js";import{B as b}from"./button-pNoJPWOG.js";import{I as i}from"./input-D6xrtGYN.js";import{L as o}from"./label-DHtVUWoS.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"99617704b9f45a03fc33f0062f9e9c40a91bb686"};var s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="b817f500-baeb-4d46-b0d2-cbab561846d2",a._sentryDebugIdIdentifier="sentry-dbid-b817f500-baeb-4d46-b0d2-cbab561846d2")}catch{}})();function x({className:a,...s}){return e.jsx("div",{"data-slot":"card",className:n("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",a),...s})}function p({className:a,...s}){return e.jsx("div",{"data-slot":"card-header",className:n("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",a),...s})}function h({className:a,...s}){return e.jsx("div",{"data-slot":"card-title",className:n("leading-none font-semibold",a),...s})}function g({className:a,...s}){return e.jsx("div",{"data-slot":"card-description",className:n("text-sm text-muted-foreground",a),...s})}function j({className:a,...s}){return e.jsx("div",{"data-slot":"card-content",className:n("px-6",a),...s})}function F(){const a=c(),s=u({mutationFn:async({email:r,password:t})=>{const{error:l}=await f.signIn.email({email:r,password:t});if(l)throw new Error("Credenciais inválidas.")},onSuccess:()=>a.navigate({to:"/admin/dashboard"})}),d=m({defaultValues:{email:"",password:""},onSubmit:async({value:r})=>s.mutate(r)});return e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs(x,{className:"w-full max-w-sm",children:[e.jsxs(p,{children:[e.jsx(h,{children:"Admin"}),e.jsx(g,{children:"Casino Estoril Poker"})]}),e.jsx(j,{children:e.jsxs("form",{onSubmit:r=>{r.preventDefault(),d.handleSubmit()},className:"space-y-4",children:[e.jsx(d.Field,{name:"email",children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"email",children:"Email"}),e.jsx(i,{id:"email",type:"email",value:r.state.value,onChange:t=>r.handleChange(t.target.value),required:!0,autoFocus:!0})]})}),e.jsx(d.Field,{name:"password",children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"password",children:"Password"}),e.jsx(i,{id:"password",type:"password",value:r.state.value,onChange:t=>r.handleChange(t.target.value),required:!0})]})}),s.error&&e.jsx("p",{className:"text-sm text-destructive",children:s.error.message}),e.jsx(b,{type:"submit",className:"w-full",disabled:s.isPending,children:s.isPending?"A entrar...":"Entrar"})]})})]})})}export{F 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.