import{u as f,c as l,a as t,b as w,e as u,f as c,w as y,d as k,v as h,t as p,g as _,r as n,h as S,o as r,k as x}from"./index-Bodg7xX-.js";import{_ as B}from"./bmmg-logo-CDMybbK7.js";const M={class:"min-h-screen bg-ink flex items-center justify-center px-6 relative overflow-hidden"},V={class:"relative w-full max-w-sm animate-fade-up"},N={key:0,class:"glass rounded-2xl p-6 space-y-4 shadow-soft text-center"},C={key:0,class:"text-sm text-wine-deep bg-wine/20 border border-wine/40 rounded-lg px-3 py-2 text-cream"},R=["disabled"],E={__name:"ForgotPassword",setup(T){const i=n(""),s=n(""),o=n(!1),m=n(!1),g=f();async function b(){var d,e;s.value="",o.value=!0;try{await g.forgotPassword(i.value),m.value=!0}catch(a){s.value=((e=(d=a.response)==null?void 0:d.data)==null?void 0:e.message)||"Something went wrong. Try again."}finally{o.value=!1}}return(d,e)=>{const a=S("router-link");return r(),l("div",M,[e[6]||(e[6]=t("div",{class:"absolute inset-0 bg-radial-fade pointer-events-none"},null,-1)),t("div",V,[e[5]||(e[5]=w('<div class="text-center mb-10"><div class="inline-flex items-center gap-2.5 mb-6"><img src="'+B+'" alt="BMMG Records" class="w-11 h-11 object-contain"><span class="font-mono text-[11px] tracking-[0.25em] uppercase text-muted">BMMG Records</span></div><h1 class="font-display text-3xl text-cream">Reset your password</h1><p class="text-muted text-sm mt-2">We&#39;ll email you a link to set a new one.</p></div>',1)),m.value?(r(),l("div",N,[e[2]||(e[2]=t("p",{class:"text-cream text-sm"}," If that email is registered, a reset link is on its way — check your inbox. ",-1)),u(a,{to:{name:"admin-login"},class:"inline-block text-sm text-gold hover:text-gold-bright transition-colors"},{default:c(()=>[...e[1]||(e[1]=[x(" Back to sign in ",-1)])]),_:1})])):(r(),l("form",{key:1,onSubmit:y(b,["prevent"]),class:"glass rounded-2xl p-6 space-y-4 shadow-soft"},[t("div",null,[e[3]||(e[3]=t("label",{class:"eyebrow block mb-2",for:"email"},"Email",-1)),k(t("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=v=>i.value=v),type:"email",required:"",autocomplete:"email",class:"w-full bg-black/30 border border-hairline rounded-lg px-4 py-2.5 text-cream placeholder:text-muted/60 focus:border-gold/50 outline-none transition-colors",placeholder:"you@bmmgrecords.com"},null,512),[[h,i.value]])]),s.value?(r(),l("p",C,p(s.value),1)):_("",!0),t("button",{type:"submit",disabled:o.value,class:"w-full bg-gold hover:bg-gold-bright disabled:opacity-50 text-ink font-semibold rounded-lg py-2.5 transition-colors"},p(o.value?"Sending…":"Send reset link"),9,R),u(a,{to:{name:"admin-login"},class:"block text-center text-sm text-muted hover:text-gold transition-colors"},{default:c(()=>[...e[4]||(e[4]=[x(" Back to sign in ",-1)])]),_:1})],32))])])}}};export{E as default};
