1import{r as d,j as s}from"./vendor-react.ELhBuE2q.js";import{u as F}from"./useChangePassword.dV3Jaj_D.js";import{S as v}from"./SmartInput.DfKyFp4R.js";import{f as p,W as x,aG as S,cd as $}from"./app-shared.CdUkAbk4.js";import{S as r}from"./TextBox.D9WGVcEh.js";import{R as C}from"./RandomPassword.Hf_IGVlZ.js";import"./useForm.CzjyTpF3.js";import"./validators.ClER9loN.js";import"./passwordRules.Cf8cmGql.js";import"./index.CL3JG3S5.js";import"./vendor-moment.BLMuvzoS.js";import"./gVar.BMCpjf-P.js";import"./vendor-ui.BSTRh9Ug.js";import"./vendor-i18n.DvM0XvO9.js";import"./vendor-router.aN8wpDPU.js";import"./vendor-axios.NIGUFBhG.js";function A({dataEvent:m,onClose:n}){const{t:a,user:_,formData:f,errors:l,handleInputChange:h,ExamPassword:u,hintColor:w,submit:g,finishOnModal:c,randomPasswordBox:j}=F(),[o,b]=d.useState({}),N=t=>b(e=>({...e,[t]:!e[t]}));d.useEffect(()=>{c===!0&&n()},[c]);const i=({label:t,name:e,placeholder:y})=>s.jsxs("div",{className:"w-full flex flex-col items-start gap-1 mb-3",children:[s.jsx(r,{styleName:"text_label_change_password_ufa",className:"text-left",label:`${t} :`}),s.jsxs("div",{className:"relative w-full",children:[s.jsx(v,{styleName:"change_password_ufa",type:o[e]?"text":"password",name:e,value:f[e],onChange:h,placeholder:y,error:`${(l==null?void 0:l[e])||""}`}),s.jsx("button",{type:"button",onClick:()=>N(e),"aria-label":o[e]?"hide password":"show password",className:"absolute right-0 top-0 h-[44px] w-[42px] flex items-center justify-center cursor-pointer",style:{background:"var(--c-primary-900, #1C2230)",color:"#FFFFFF",borderRadius:"0 6px 6px 0"},children:o[e]?s.jsx(S,{size:18}):s.jsx($,{size:18})})]})]});return s.jsx("div",{className:`m-auto w-full ${m?"max-w-[370px] pt-[25px]":"max-w-3xl"}`,children:s.jsxs(p,{styleName:"bg_change_password_ufa",className:"relative",children:[s.jsx("div",{className:"flex justify-center",style:{marginTop:"-25px"},children:s.jsx(p,{styleName:"bg_header_badge_change_password_ufa",className:"inline-flex items-center justify-center",children:s.jsx(r,{styleName:"text_header_badge_change_password_ufa",label:a("change_password")})})}),s.jsxs("div",{className:"relative flex flex-col mt-3",children:[_.cust_status!==3&&i({label:a("old_password"),name:"old_password",placeholder:`${a("old_password")}`}),i({label:a("set_new_password"),name:"password",placeholder:`${a("set_new_password")}`}),i({label:a("confirm_password"),name:"password_confirmation",placeholder:`${a("password_confirmation")}`}),s.jsx(C,{...j}),s.jsx("div",{className:"w-full mt-1 mb-3",children:s.jsx(x,{styleName:"btn_submit_change_password_ufa",label:a("send"),onClick:()=>g()})}),s.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[["your_password_must_characters","your_password_letters_and_numbers","reset_password_rule_match"].map((t,e)=>s.jsxs("div",{className:"flex items-start gap-1 text-left",children:[s.jsx("span",{style:{color:w(e,"#FFFFFF"),fontFamily:"Prompt",fontSize:"13px",fontWeight:600,lineHeight:"1.5"},children:"*"}),s.jsx(r,{styleName:"text_hint_change_password_ufa",className:"text-left",label:a(t)})]},t)),s.jsxs("div",{className:"flex items-center gap-1 flex-wrap text-left",children:[s.jsx(r,{styleName:"text_hint_change_password_ufa",className:"text-left",label:`*${a("exam_change_password")}`}),s.jsx(u,{})]})]}),m&&s.jsx("div",{className:"mt-4",children:s.jsx(x,{styleName:"btn_close_change_password_ufa",label:a("cancel"),onClick:()=>n()})})]})]})})}export{A 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.