import{C as s,l,A as f,B as x,n as t,t as i,u as r,x as c,p as h,q as y,v,Q as u,I as k,g as w}from"./Button-d1z8wTLU.js";import{u as z,h as S,a as _}from"./app-7BbCn0tA.js";const q=["content"],C={key:0,class:"absolute inset-0 bg-black/50","aria-hidden":"true"},V={class:"relative z-10 w-full max-w-md rounded-2xl border border-white/10 bg-zinc-900/90 p-8 shadow-2xl backdrop-blur-sm"},j={class:"flex flex-col items-center text-center"},B=["src","alt"],E={class:"text-2xl font-bold tracking-tight text-white"},F={key:0,class:"mt-6 rounded-xl bg-emerald-500/20 px-4 py-3 text-sm text-emerald-300"},M={key:0,class:"mt-1.5 text-sm text-red-400"},I=["disabled"],N={class:"mt-6 text-center"},$=["href"],O={__name:"ForgotPassword",props:{slug:{type:String,required:!0},product:{type:Object,required:!0}},setup(e){const n=e,m=_(),d=w(()=>m.props.flash?.status??null),o=z({email:""});function g(){o.post(`/m/${n.slug}/esqueci-senha`,{preserveScroll:!0,onFinish:()=>o.reset("email")})}const p=()=>n.product.background_image?{backgroundImage:`url(${n.product.background_image})`}:{backgroundColor:n.product.background_color||"#18181b"};return(D,a)=>(s(),l(k,null,[f(r(S),null,{default:x(()=>[t("title",null,"Recuperar senha – "+i(e.product.title||e.product.name||"Área de Membros"),1),t("meta",{name:"theme-color",content:e.product.primary_color||"#0ea5e9"},null,8,q)]),_:1}),t("div",{class:"flex min-h-screen flex-col items-center justify-center bg-cover bg-center px-4 py-12 transition-colors",style:u({"--ma-primary":e.product.primary_color||"#0ea5e9",...p()})},[e.product.background_image?(s(),l("div",C)):c("",!0),t("div",V,[t("div",j,[e.product.logo_light?(s(),l("img",{key:0,src:e.product.logo_light,alt:e.product.title||e.product.name,class:"mb-6 h-12 w-auto max-w-[200px] object-contain object-center"},null,8,B)):c("",!0),t("h1",E,i(e.product.title||e.product.name||"Área de Membros"),1),a[1]||(a[1]=t("p",{class:"mt-1.5 text-sm text-zinc-400"}," Informe seu e-mail para receber o link de redefinição de senha. ",-1))]),d.value?(s(),l("div",F,i(d.value),1)):c("",!0),t("form",{class:"mt-6 space-y-5",onSubmit:h(g,["prevent"])},[t("div",null,[a[2]||(a[2]=t("label",{for:"email",class:"mb-1.5 block text-sm font-medium text-zinc-300"},"E-mail",-1)),y(t("input",{id:"email","onUpdate:modelValue":a[0]||(a[0]=b=>r(o).email=b),type:"email",autocomplete:"email",required:"",class:"w-full rounded-xl border border-zinc-600 bg-zinc-800/80 px-4 py-3 text-white placeholder-zinc-500 transition focus:border-[var(--ma-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--ma-primary)]/30",placeholder:"seu@email.com"},null,512),[[v,r(o).email]]),r(o).errors.email?(s(),l("p",M,i(r(o).errors.email),1)):c("",!0)]),t("button",{type:"submit",class:"w-full rounded-xl px-4 py-3.5 font-semibold text-white shadow-lg transition hover:opacity-95 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 disabled:opacity-50",style:u({backgroundColor:e.product.primary_color||"#0ea5e9"}),disabled:r(o).processing},i(r(o).processing?"Enviando…":"Enviar link"),13,I)],32),t("p",N,[t("a",{href:`/m/${e.slug}/login`,class:"text-sm font-medium transition hover:underline",style:u({color:e.product.primary_color||"#0ea5e9"})}," Voltar ao login ",12,$)])])],4)],64))}};export{O as default};
