1import{E as w,r as c,j as s,v as p,q as t}from"./index-42OYDF60.js";import{B as u}from"./button-EfpS49lo.js";import{I as i}from"./input-D0IjS33j.js";import{L as o}from"./label-BNvpn1fK.js";import{L as g}from"./loader-circle-C9c4MVet.js";import{S as j}from"./save-D7r0WXgf.js";const P=()=>{const{user:e}=w(),[r,f]=c.useState((e==null?void 0:e.email)??""),[l,m]=c.useState(""),[x,h]=c.useState(""),[d,n]=c.useState(!1),N=async()=>{if(!r||r===(e==null?void 0:e.email))return;n(!0);const{error:a}=await p.auth.updateUser({email:r});n(!1),a?t.error(a.message):t.success("à¦à¦®à§à¦à¦² à¦à¦ªà¦¡à§à¦ রিà¦à§à¦¯à¦¼à§à¦¸à§à¦ পাঠানৠহয়à§à¦à§ â à¦à¦¨à¦«à¦¾à¦°à§à¦®à§à¦¶à¦¨ লিà¦à¦ পরà§à¦à§à¦·à¦¾ à¦à¦°à§à¦¨")},v=async()=>{if(l.length<8){t.error("পাসà¦à¦¯à¦¼à¦¾à¦°à§à¦¡ à¦à¦®à¦ªà¦à§à¦·à§ à§® à¦
à¦à§à¦·à¦°");return}if(l!==x){t.error("পাসà¦à¦¯à¦¼à¦¾à¦°à§à¦¡ মিলà¦à§ না");return}n(!0);const{error:a}=await p.auth.updateUser({password:l});n(!1),a?t.error(a.message):(t.success("পাসà¦à¦¯à¦¼à¦¾à¦°à§à¦¡ à¦à¦ªà¦¡à§à¦ হয়à§à¦à§"),m(""),h(""))};return s.jsxs("div",{className:"space-y-5 max-w-2xl",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-extrabold tracking-tight",children:"à¦à¦®à¦¾à¦° à¦
à§à¦¯à¦¾à¦à¦¾à¦à¦¨à§à¦"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"à¦à¦®à§à¦à¦² ঠপাসà¦à¦¯à¦¼à¦¾à¦°à§à¦¡ পরিবরà§à¦¤à¦¨"})]}),s.jsxs("div",{className:"rounded-2xl glass-card p-5 space-y-3",children:[s.jsx("h2",{className:"text-lg font-bold",children:"à¦à¦®à§à¦à¦² পরিবরà§à¦¤à¦¨"}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(o,{children:"à¦à¦®à§à¦à¦²"}),s.jsx(i,{type:"email",value:r,onChange:a=>f(a.target.value)})]}),s.jsxs(u,{onClick:N,disabled:d||r===(e==null?void 0:e.email),className:"gradient-primary text-primary-foreground",children:[d?s.jsx(g,{className:"h-4 w-4 animate-spin"}):s.jsx(j,{className:"h-4 w-4"})," à¦à¦®à§à¦à¦² à¦à¦ªà¦¡à§à¦"]})]}),s.jsxs("div",{className:"rounded-2xl glass-card p-5 space-y-3",children:[s.jsx("h2",{className:"text-lg font-bold",children:"পাসà¦à¦¯à¦¼à¦¾à¦°à§à¦¡ পরিবরà§à¦¤à¦¨"}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(o,{children:"নতà§à¦¨ পাসà¦à¦¯à¦¼à¦¾à¦°à§à¦¡"}),s.jsx(i,{type:"password",value:l,onChange:a=>m(a.target.value),minLength:8})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(o,{children:"à¦à¦¨à¦«à¦¾à¦°à§à¦® পাসà¦à¦¯à¦¼à¦¾à¦°à§à¦¡"}),s.jsx(i,{type:"password",value:x,onChange:a=>h(a.target.value),minLength:8})]}),s.jsxs(u,{onClick:v,disabled:d||!l,className:"gradient-primary text-primary-foreground",children:[d?s.jsx(g,{className:"h-4 w-4 animate-spin"}):s.jsx(j,{className:"h-4 w-4"})," পাসà¦à¦¯à¦¼à¦¾à¦°à§à¦¡ à¦à¦ªà¦¡à§à¦"]})]}),s.jsxs("div",{className:"rounded-2xl glass-card p-5 space-y-2",children:[s.jsx("h2",{className:"text-lg font-bold text-muted-foreground",children:"তথà§à¦¯"}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"User ID:"})," ",s.jsx("code",{className:"text-xs",children:e==null?void 0:e.id})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"যà§à¦à¦¦à¦¾à¦¨:"})," ",(e==null?void 0:e.created_at)&&new Date(e.created_at).toLocaleString()]})]})]})};export{P as default};
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.