import{S as j,r as c,j as e,a as v}from"./app-Bup04Qnx.js";import{G as N}from"./GuestLayout-DKOnScVi.js";import{u as y}from"./useFormChange-D35moWjQ.js";import"./format-CisCU4Rs.js";function z(s){var d,m;const{status:o}=s,{data:n,setData:u,post:x,processing:l,errors:t,reset:p}=j({email:"",password:"",remember:1}),[r,f]=c.useState(!1);c.useEffect(()=>()=>{p("password")},[]);function i(a){let{name:g,value:b}=y(a);u(w=>({...w,[g]:b}))}const h=a=>{a.preventDefault(),x("/login")};return e.jsxs(N,{children:[e.jsx(v,{title:`Log in - ${s.appName}`}),e.jsxs("div",{className:"bg-white/5 backdrop-blur-sm md:bg-transparent rounded-2xl p-6 md:p-0 shadow-xl md:shadow-none border border-white/10 md:border-none",children:[e.jsx("div",{className:"flex items-center mb-10",children:e.jsx("h2",{className:"text-3xl font-bold pr-8 md:pr-0 text-center md:text-left drop-shadow-md text-white",children:"Login"})}),o&&e.jsx("div",{className:"mb-4 text-sm font-medium text-green-600",children:o}),((d=s.flash)==null?void 0:d.message)&&e.jsx("div",{className:"mb-4 text-center text-red-500 font-semibold bg-red-100 p-2 rounded",children:(m=s.flash)==null?void 0:m.message}),e.jsxs("form",{onSubmit:h,className:"space-y-6",children:[e.jsxs("div",{className:"relative group",children:[e.jsx("input",{className:"backdrop-blur-sm bg-white/90 block w-full pl-10 pr-3 py-3 border-none rounded-md leading-5 text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-purple-400 focus:bg-white sm:text-sm shadow-sm transition-all duration-200",id:"email",name:"email",placeholder:"Email",type:"email",value:n.email,onChange:i,required:!0}),e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none z-10 text-gray-500",children:e.jsx("i",{className:"fa fa-envelope text-xl group-focus-within:text-[#3f2b96] transition-colors"})}),t.email&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:t.email})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("input",{className:"backdrop-blur-sm bg-white/90 block w-full pl-10 pr-10 py-3 border-none rounded-md leading-5 text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-purple-400 focus:bg-white sm:text-sm shadow-sm transition-all duration-200",id:"password",name:"password",placeholder:"Password",type:r?"text":"password",value:n.password,onChange:i,required:!0}),e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none z-10 text-gray-500",children:e.jsx("i",{className:"fa fa-lock text-xl group-focus-within:text-[#3f2b96] transition-colors"})}),e.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center cursor-pointer text-gray-500 hover:text-[#3f2b96] transition-colors z-10",onClick:()=>f(!r),children:e.jsx("i",{className:`fa text-xl group-focus-within:text-[#3f2b96] transition-colors ${r?"fa-eye-slash":"fa-eye"}`})}),t.password&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:t.password})]}),e.jsx("div",{className:"pt-4",children:e.jsxs("button",{disabled:l,type:"submit",className:"group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-semibold rounded-full text-white bg-gradient-to-r from-[#482c9e] to-[#2e1c68] hover:from-[#5a3bc4] hover:to-[#3e268a] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 shadow-lg transform active:scale-95 transition-all duration-200 overflow-hidden ring-1 ring-white/20",children:[e.jsx("span",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full group-hover:animate-shimmer"}),l?"Memproses...":"Masuk"]})})]})]})]})}export{z as default};
