import{C as o,l as n,n as e,t as i,x as d,p as k,q as c,v as h,u as s,y as v,z as m,N as w,A as f,B as p,D as b,_ as z,g as y,e as _}from"./Button-d1z8wTLU.js";import{u as E,E as V,b as B,l as C,a as M}from"./app-D0m_AEcd.js";const N={class:"flex min-h-screen"},j={class:"flex w-full flex-col justify-center px-8 py-12 lg:w-[30%] lg:min-w-[360px]"},q={key:0,class:"mt-4 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-200"},D={key:0,class:"mt-1.5 text-sm text-red-600 dark:text-red-400"},S={class:"relative mt-1.5"},U=["type"],A=["aria-label"],F={key:0,class:"mt-1.5 text-sm text-red-600 dark:text-red-400"},L={class:"flex items-center gap-3"},O={class:"mt-6 text-center"},R={__name:"Login",setup(P){const l=_(!1),x=M(),u=y(()=>x.props.flash?.error??null),r=E({email:"",password:"",remember:!1});function g(){r.post("/login",{onFinish:()=>r.reset("password")})}return(T,t)=>(o(),n("div",N,[e("div",j,[t[8]||(t[8]=e("div",{class:"text-center"},[e("img",{src:"https://cdn.getfy.cloud/collapsed-logo.png",alt:"Getfy",class:"mx-auto mb-10 h-12 w-auto object-contain"}),e("h1",{class:"text-2xl font-bold text-zinc-900 dark:text-white"},"Entrar"),e("p",{class:"mt-1 text-sm text-zinc-600 dark:text-zinc-400"},"Acesse sua plataforma")],-1)),u.value?(o(),n("p",q,i(u.value),1)):d("",!0),e("form",{class:"mt-8 space-y-5",onSubmit:k(g,["prevent"])},[e("div",null,[t[4]||(t[4]=e("label",{for:"email",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"E-mail",-1)),c(e("input",{id:"email","onUpdate:modelValue":t[0]||(t[0]=a=>s(r).email=a),type:"email",autocomplete:"email",required:"",class:"mt-1.5 block w-full rounded-xl border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-zinc-900 px-4 py-3 text-zinc-900 dark:text-white placeholder-zinc-500 shadow-sm transition hover:border-[#c8fa64] focus:border-[#c8fa64] focus:outline-none focus:ring-2 focus:ring-[#c8fa64]/30",placeholder:"seu@email.com"},null,512),[[h,s(r).email]]),s(r).errors.email?(o(),n("p",D,i(s(r).errors.email),1)):d("",!0)]),e("div",null,[t[5]||(t[5]=e("label",{for:"password",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"Senha",-1)),e("div",S,[c(e("input",{id:"password","onUpdate:modelValue":t[1]||(t[1]=a=>s(r).password=a),type:l.value?"text":"password",autocomplete:"current-password",required:"",class:"block w-full rounded-xl border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-zinc-900 py-3 pl-4 pr-12 text-zinc-900 dark:text-white placeholder-zinc-500 shadow-sm transition hover:border-[#c8fa64] focus:border-[#c8fa64] focus:outline-none focus:ring-2 focus:ring-[#c8fa64]/30",placeholder:"••••••••"},null,8,U),[[v,s(r).password]]),e("button",{type:"button",class:"absolute right-3 top-1/2 -translate-y-1/2 rounded p-1.5 text-zinc-500 transition hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 focus:outline-none focus:ring-2 focus:ring-[#c8fa64]/30","aria-label":l.value?"Ocultar senha":"Mostrar senha",onClick:t[2]||(t[2]=a=>l.value=!l.value)},[l.value?(o(),m(s(V),{key:0,class:"h-5 w-5"})):(o(),m(s(B),{key:1,class:"h-5 w-5"}))],8,A)]),s(r).errors.password?(o(),n("p",F,i(s(r).errors.password),1)):d("",!0)]),e("div",L,[c(e("input",{id:"remember","onUpdate:modelValue":t[3]||(t[3]=a=>s(r).remember=a),type:"checkbox",class:"h-4 w-4 rounded border-zinc-300 text-[#c8fa64] focus:ring-[#c8fa64]/50 dark:border-zinc-600"},null,512),[[w,s(r).remember]]),t[6]||(t[6]=e("label",{for:"remember",class:"text-sm text-zinc-700 dark:text-zinc-300"},"Lembrar de mim",-1))]),f(z,{type:"submit",class:"w-full !bg-[#c8fa64] !text-zinc-900 hover:!opacity-90",disabled:s(r).processing},{default:p(()=>[b(i(s(r).processing?"Entrando…":"Entrar"),1)]),_:1},8,["disabled"])],32),e("p",O,[f(s(C),{href:"/esqueci-senha",class:"text-sm font-medium text-[#c8fa64] hover:underline focus:outline-none focus:ring-2 focus:ring-[#c8fa64]/30 focus:ring-offset-2 dark:focus:ring-offset-zinc-900 rounded"},{default:p(()=>[...t[7]||(t[7]=[b(" Recuperar senha ",-1)])]),_:1})])]),t[9]||(t[9]=e("div",{class:"relative hidden overflow-hidden bg-zinc-100 dark:bg-zinc-900 lg:flex lg:flex-1 lg:items-center lg:justify-center","aria-hidden":"true"},[e("div",{class:"absolute inset-0 bg-gradient-to-br from-[#c8fa64]/20 via-transparent to-sky-500/10"}),e("img",{src:"https://cdn.getfy.cloud/login.webp",alt:"",class:"absolute inset-0 h-full w-full object-cover"}),e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/25 via-black/5 to-transparent"})],-1))]))}};export{R as default};
