(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,6472,e=>{"use strict";var t=e.i(43476),s=e.i(20133),r=e.i(48148),o=e.i(71645);e.s(["AdminLoginForm",0,function(){let e=(0,r.useTranslations)("admin"),a=(0,s.useRouter)(),[n,d]=(0,o.useState)(!1),[i,l]=(0,o.useState)(!1);async function u(e){e.preventDefault(),l(!0),d(!1);let t=String(new FormData(e.currentTarget).get("password"));try{if(!(await fetch("/api/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:t})})).ok)return void d(!0);a.push("/admin"),a.refresh()}finally{l(!1)}}return(0,t.jsxs)("div",{className:"mx-auto max-w-sm px-4 py-20",children:[(0,t.jsx)("h1",{className:"font-[family-name:var(--font-display)] text-3xl text-foreground",children:e("loginTitle")}),(0,t.jsx)("p",{className:"mt-2 text-sm text-muted",children:e("loginSubtitle")}),(0,t.jsxs)("form",{onSubmit:u,className:"mt-8 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"mb-1 block text-sm text-muted",children:e("password")}),(0,t.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"})]}),n&&(0,t.jsx)("p",{className:"text-sm text-red-400",role:"alert",children:e("badPassword")}),(0,t.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?"…":e("signIn")})]})]})}])}]);