1import{j as e,P as g,L as j,I as b,aB as y,S as w}from"./index-DYb9XDPI.js";import{r as o}from"./redux-CWpIluPy.js";import{P as d}from"./index.esm-DmXM6Zbn.js";import{b as P}from"./react-BQvoLKUC.js";import{L as v}from"./lock-DctNyuR9.js";import"./ui-CCusv-BE.js";import"./vendor-B6ynCCA9.js";const z=()=>{const p=P(),[n,s]=o.useState({pin:["","","",""],confirmPin:["","","",""]}),[a,x]=o.useState(!1),[l,m]=o.useState(!1),f=(t,i)=>{s({...n,[t]:i})},u=async()=>{m(!0);const t={bvn:null,pin:n.pin.join("")};try{await y(t),w("Transaction Pin set successfully"),p("/")}catch{m(!1)}},h=()=>{x(!0);const{pin:t,confirmPin:i}=n,r=t.join(""),c=i.join("");r!==c&&b("Pins don't match"),r===c&&u()};return e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Setup Pin"}),e.jsx("div",{className:"flex items-center justify-center w-full h-screen",children:e.jsxs("div",{className:"flex flex-col items-center justify-center w-8/12 py-2 gap-y-10 md:w-10/12 lg:w-6/12 xl:6/12",children:[e.jsx("img",{src:v,alt:"lock_img"}),e.jsxs("div",{className:"flex flex-col items-center py-2",children:[e.jsx("h2",{className:"text-xl font-bold text-[#101828] font-gilroyBold",children:"Create transaction pin"}),e.jsx("p",{className:"text-[#667085] pt-2 w-fit md:w-7/12 lg:w-8/12 xl:w-7/12 text-center text-xs tracking-wide lg:text-sm font-avenirBook",children:"Complete every transaction with your pin and give your account an extra layer of security"})]}),e.jsx("form",{children:e.jsxs("div",{className:"flex flex-col items-center p-4",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("label",{htmlFor:"pin",className:"pl-4 font-avenirBook",children:"Enter your PIN"}),e.jsx(d,{id:"pin",values:n.pin,onChange:(t,i,r)=>f("pin",r),size:"lg",focusBorderColor:"transparent",inputStyle:{height:"4rem",width:"4rem",margin:"1rem 1rem",fontSize:"2rem",fontWeight:600,border:"none",borderBottom:"1px solid rgba(16, 24, 40, 0.49)",borderRadius:"0px",outline:"none",padding:"5px 0px"},placeholder:"",showState:a,mask:!0,required:!0})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{htmlFor:"confirmPin",className:"pl-4 font-avenirBook",children:"Confirm your PIN"}),e.jsx(d,{id:"confirmPin",values:n.confirmPin,onChange:(t,i,r)=>s({...n,confirmPin:r}),size:"lg",name:"password",inputStyle:{height:"4rem",width:"4rem",margin:"1rem 1rem",fontSize:"2rem",fontWeight:600,border:"none",borderBottom:"1px solid rgba(16, 24, 40, 0.49)",borderRadius:"0px",outline:"none",padding:"5px 0px"},placeholder:"",mask:!0,required:!0,showState:a,onComplete:h})]}),e.jsx("button",{type:"submit",disabled:l,className:"py-3 text-center text-white bg-[#009FF5] rounded-md font-semibold mt-10 relative w-full ml-2 text-base font-gilroyBold",children:l?e.jsx(j,{size:"sm"}):"Create Pin"})]})})]})})]})};export{z 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.