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 o in s)x.call(s,o)&&a.indexOf(o)<0&&(r[o]=s[o]);if(s!=null&&t)for(var o of t(s))a.indexOf(o)<0&&g.call(s,o)&&(r[o]=s[o]);return r};import{j as e}from"./radixui-DBNNXUn7.js";import"./router-ZPDjRWWZ.js";import{u as C,c as I,I as j,B as S}from"./index-C1-9bQes.js";import{z as i}from"./utils-CbOYy0fT.js";import{u as z,t as A,F as B,a as p,b as f,c as h,d as b,e as N}from"./form-ChakSTWw.js";import{C as E,a as P}from"./card-BaxfxC-x.js";import"./vendor-C0DUGSOM.js";import"./icons-DvPHMWAM.js";import"./label-wWBD5Ozj.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 o=r,{className:s}=o,a=u(o,["className"]);const c=M(),{login:v}=C(),w=n=>{v(n.email,n.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(p,{control:c.control,name:"email",render:({field:n})=>e.jsxs(f,{children:[e.jsx(h,{children:"Email"}),e.jsx(b,{children:e.jsx(j,l({placeholder:"Ingresa el email"},n))}),e.jsx(N,{className:"text-xs"})]})}),e.jsx(p,{control:c.control,name:"password",render:({field:n})=>e.jsxs(f,{children:[e.jsx(h,{children:"Contraseña"}),e.jsx(b,{children:e.jsx(j,l({type:"password",placeholder:"Ingresa la contraseña"},n))}),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 U(){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{U as default};
