1import{j as e,L as d}from"./vendor-BEUer1XH.js";import{r as j}from"./customer.api-BzxcvvEW.js";import{a as g,c as b}from"./format.phone-BhePyXg2.js";import{u as N}from"./useMutation-KANBv_r7.js";import{i as A}from"./utils-w1iDNRBg.js";import{D as F,B as y}from"./index-DENArrSa.js";import{F as i}from"./index-BYqFq3zo.js";import{I}from"./index-CW5BAikS.js";import{B as P}from"./Breadcrumb-DW4w8HQp.js";import"./index-xmoZg6gj.js";import"./index-C9C5-gxl.js";import"./collapse-BbEVqHco.js";import"./useForm-DrUwT_4T.js";import"./useBreakpoint-BBrUbbpN.js";import"./mediaQueryUtil-BSyvLspT.js";import"./Input-CD5EvbY1.js";import"./EyeOutlined-D647LYEE.js";import"./Search-cPbr6bPB.js";import"./SearchOutlined-DVVMytpw.js";import"./DownOutlined-CeXDrnPO.js";import"./dropdown-qHy0AlcK.js";import"./LeftOutlined-CpjQE-vN.js";import"./RightOutlined-9GOMZsx1.js";import"./Dropdown-CDCCRALY.js";import"./PurePanel-CbtVgttN.js";import"./index-BzPrgs7b.js";import"./EllipsisOutlined-Djar-icM.js";import"./Overflow-CAQIMHA2.js";const R=()=>{const{notification:o}=F.useApp(),[u]=i.useForm(),{mutate:f,isPending:h}=N({mutationFn:s=>j(s)}),x=s=>{s.phone_number=b(s.phone_number),f(s,{onSettled:(m,t)=>{var n,p,r,a,l;if(m)o.success({message:m==null?void 0:m.message});else if(t&&A(t)){let c=t==null?void 0:t.message;(p=(n=t==null?void 0:t.response)==null?void 0:n.data)!=null&&p.error&&(c=(l=(a=(r=t==null?void 0:t.response)==null?void 0:r.data)==null?void 0:a.details)==null?void 0:l.message),o.error({message:c})}}})};return e.jsx(e.Fragment,{children:e.jsxs(i,{requiredMark:!1,name:"form-code-generator",onFinish:x,form:u,autoComplete:"off",layout:"vertical",className:"flex items-end max-w-md gap-4",children:[e.jsx(i.Item,{label:"Customer Phone Number:",name:"phone_number",rules:[{required:!0,message:"Please input your phone number!"}],className:"w-full",children:e.jsx(I,{placeholder:"Input phone number",onKeyUp:g})}),e.jsx(i.Item,{className:"text-right",children:e.jsx(y,{type:"primary",htmlType:"submit",loading:h,children:"Reset"})})]})})},te=()=>e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"container",children:e.jsx(P,{style:{margin:"16px 0"},items:[{title:e.jsx(d,{to:"/admin",children:"..."})},{title:"Reset OTP Attempts"}]})}),e.jsxs("section",{className:"container",children:[e.jsx("p",{className:"mb-4",children:"Use the form below to reset the otp attempts limit"}),e.jsx(R,{})]})]});export{te 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.