import{u as w,c as u,a as t,b as y,w as h,d as m,v as c,e as k,f as _,t as p,g as S,r as a,h as M,i as V,j as B,o as g,k as N}from"./index-Bodg7xX-.js";import{_ as j}from"./bmmg-logo-CDMybbK7.js";const R={class:"min-h-screen bg-ink flex items-center justify-center px-6 relative overflow-hidden"},q={class:"relative w-full max-w-sm animate-fade-up"},A={class:"flex items-center justify-between mb-2"},C={key:0,class:"text-sm text-wine-deep bg-wine/20 border border-wine/40 rounded-lg px-3 py-2 text-cream"},T=["disabled"],U={__name:"AdminLogin",setup(D){const l=a(""),r=a(""),s=a(""),o=a(!1),b=w(),v=V(),x=B();async function f(){var n,e;s.value="",o.value=!0;try{await b.login(l.value,r.value),v.push(x.query.redirect||{name:"admin-songs"})}catch(i){s.value=((e=(n=i.response)==null?void 0:n.data)==null?void 0:e.message)||"Something went wrong. Try again."}finally{o.value=!1}}return(n,e)=>{const i=M("router-link");return g(),u("div",R,[e[6]||(e[6]=t("div",{class:"absolute inset-0 bg-radial-fade pointer-events-none"},null,-1)),t("div",q,[e[5]||(e[5]=y('<div class="text-center mb-10"><div class="inline-flex items-center gap-2.5 mb-6"><img src="'+j+'" 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">Admin sign in</h1><p class="text-muted text-sm mt-2">Manage releases and landing pages.</p></div>',1)),t("form",{onSubmit:h(f,["prevent"]),class:"glass rounded-2xl p-6 space-y-4 shadow-soft"},[t("div",null,[e[2]||(e[2]=t("label",{class:"eyebrow block mb-2",for:"email"},"Email",-1)),m(t("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=d=>l.value=d),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),[[c,l.value]])]),t("div",null,[t("div",A,[e[4]||(e[4]=t("label",{class:"eyebrow",for:"password"},"Password",-1)),k(i,{to:{name:"admin-forgot-password"},class:"text-xs text-muted hover:text-gold transition-colors"},{default:_(()=>[...e[3]||(e[3]=[N(" Forgot password? ",-1)])]),_:1})]),m(t("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=d=>r.value=d),type:"password",required:"",autocomplete:"current-password",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:"••••••••"},null,512),[[c,r.value]])]),s.value?(g(),u("p",C,p(s.value),1)):S("",!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?"Signing in…":"Sign in"),9,T)],32)])])}}};export{U as default};
