var F=Object.defineProperty,L=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var t=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var d=(s,a,r)=>a in s?F(s,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[a]=r,l=(s,a)=>{for(var r in a||(a={}))x.call(a,r)&&d(s,r,a[r]);if(t)for(var r of t(a))g.call(a,r)&&d(s,r,a[r]);return s},m=(s,a)=>L(s,y(a));var u=(s,a)=>{var r={};for(var n in s)x.call(s,n)&&a.indexOf(n)<0&&(r[n]=s[n]);if(s!=null&&t)for(var n of t(s))a.indexOf(n)<0&&g.call(s,n)&&(r[n]=s[n]);return r};import{u as C,j as e,c as I,I as j,B as S}from"./index-C7Y5J1TO.js";import{z as i,u as z,t as A,F as B,a as h,b as f,c as p,d as b,e as N}from"./form-DuLR_XsI.js";import{C as E,a as P}from"./card-DDrJ6Iia.js";import"./label-CbvzEgFe.js";const V=i.object({email:i.string().email({message:"Por favor, ingresa un correo electrónico válido."}).min(5,{message:"El correo electrónico debe tener al menos 5 caracteres."}).toLowerCase(),password:i.string().min(8,{message:"La contraseña debe tener al menos 8 caracteres."}).max(128,{message:"La contraseña no puede exceder los 128 caracteres."}).regex(/[A-Z]/,{message:"La contraseña debe contener al menos una letra mayúscula."}).regex(/[a-z]/,{message:"La contraseña debe contener al menos una letra minúscula."}).regex(/[0-9]/,{message:"La contraseña debe contener al menos un número."}).regex(/[^a-zA-Z0-9]/,{message:"La contraseña debe contener al menos un carácter especial."})}),Z={email:"",password:""};function M(){return z({resolver:A(V),defaultValues:Z})}function R(r){var n=r,{className:s}=n,a=u(n,["className"]);const c=M(),{login:v}=C(),w=o=>{v(o.email,o.password)};return e.jsx("div",m(l({className:I("flex flex-col gap-6",s)},a),{children:e.jsx(E,{className:"overflow-hidden border-gray-secondary",children:e.jsxs(P,{className:"grid p-0 md:grid-cols-2",children:[e.jsx(B,m(l({},c),{children:e.jsx("form",{onSubmit:c.handleSubmit(w),className:"p-6 md:p-8",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Bienvenido de nuevo"}),e.jsx("p",{className:"text-balance text-muted-foreground",children:"Formulario de acceso"})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsx(h,{control:c.control,name:"email",render:({field:o})=>e.jsxs(f,{children:[e.jsx(p,{children:"Email"}),e.jsx(b,{children:e.jsx(j,l({placeholder:"Ingresa el email"},o))}),e.jsx(N,{className:"text-xs"})]})}),e.jsx(h,{control:c.control,name:"password",render:({field:o})=>e.jsxs(f,{children:[e.jsx(p,{children:"Contraseña"}),e.jsx(b,{children:e.jsx(j,l({type:"password",placeholder:"Ingresa la contraseña"},o))}),e.jsx(N,{className:"text-xs"})]})})]}),e.jsx(S,{type:"submit",className:"w-full",children:"Iniciar sesión"})]})})})),e.jsx("div",{className:"bg-gray-secondary/50 flex justify-center items-center",children:e.jsx("img",{className:"h-auto w-64",src:"/assets/logos/CamSoda.png",alt:"CamSoda Logo"})})]})})}))}function J(){return e.jsx("div",{className:"flex min-h-svh flex-col items-center justify-center bg-gray-secondary p-6 md:p-10",children:e.jsx("div",{className:"w-full max-w-sm md:max-w-3xl",children:e.jsx(R,{})})})}export{J as default};
