1import{h as l,r as d,j as s,B as m,t as i,x as t,s as g}from"./index-BCGrvFuq.js";import{A as w}from"./AuthShell-BXPyFlHg.js";import{I as h}from"./input-DgtOFYLN.js";import{L as f}from"./label-opIYTMqD.js";import"./index-DhMUBjnI.js";function y(){const p=l(),[e,u]=d.useState(""),[o,n]=d.useState(!1),c=async r=>{if(r.preventDefault(),e.length<8){i("form_error",{form_name:"vendor_reset_password",error_type:"validation",error_message:"Password must be at least 8 characters"}),t.error("Password must be at least 8 characters");return}n(!0);const{error:a}=await g.auth.updateUser({password:e});if(n(!1),a){i("form_error",{form_name:"vendor_reset_password",error_type:"auth",error_message:a.message.slice(0,150)}),t.error(a.message);return}t.success("Password updated"),p({to:"/vendors/portal"})};return s.jsx(w,{title:"Set a new password",subtitle:"Choose a strong password to secure your account.",children:s.jsxs("form",{onSubmit:c,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(f,{htmlFor:"password",children:"New password"}),s.jsx(h,{id:"password",type:"password",value:e,onChange:r=>u(r.target.value),required:!0,minLength:8})]}),s.jsx(m,{type:"submit",disabled:o,className:"w-full bg-gold text-ink hover:bg-gold-bright uppercase tracking-wider text-xs font-bold",children:o?"Savingâ¦":"Update password"})]})})}export{y as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.