module.exports=[31307,a=>{"use strict";var b=a.i(87924),c=a.i(55027),d=a.i(15925),e=a.i(72131);a.s(["AdminLoginForm",0,function(){let a=(0,d.useTranslations)("admin"),f=(0,c.useRouter)(),[g,h]=(0,e.useState)(!1),[i,j]=(0,e.useState)(!1);async function k(a){a.preventDefault(),j(!0),h(!1);let b=String(new FormData(a.currentTarget).get("password"));try{if(!(await fetch("/api/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:b})})).ok)return void h(!0);f.push("/admin"),f.refresh()}finally{j(!1)}}return(0,b.jsxs)("div",{className:"mx-auto max-w-sm px-4 py-20",children:[(0,b.jsx)("h1",{className:"font-[family-name:var(--font-display)] text-3xl text-foreground",children:a("loginTitle")}),(0,b.jsx)("p",{className:"mt-2 text-sm text-muted",children:a("loginSubtitle")}),(0,b.jsxs)("form",{onSubmit:k,className:"mt-8 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"mb-1 block text-sm text-muted",children:a("password")}),(0,b.jsx)("input",{required:!0,type:"password",name:"password",autoComplete:"current-password",className:"w-full rounded-md border border-border bg-card px-3 py-2 text-foreground focus:border-gold focus:outline-none focus:ring-1 focus:ring-gold"})]}),g&&(0,b.jsx)("p",{className:"text-sm text-red-400",role:"alert",children:a("badPassword")}),(0,b.jsx)("button",{type:"submit",disabled:i,className:"w-full rounded-md bg-gold py-3 text-sm font-medium text-background hover:bg-gold-hover disabled:opacity-60",children:i?"…":a("signIn")})]})]})}])}];

//# sourceMappingURL=src_app_%5Blocale%5D_admin_login_AdminLoginForm_tsx_0zzed2g._.js.map