(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4525],{49342:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>o});var l=s(37876),r=s(14232),t=s(31777),i=s(89099),n=s(3945),d=s(59561),c=s(19519),u=s(1785);s(73683);let o=()=>{let e=(0,t.wA)(),a=(0,i.useRouter)(),[s,o]=(0,r.useState)(""),[m,h]=(0,r.useState)(""),[p,x]=(0,r.useState)(""),j=async l=>{l.preventDefault();try{if(!(await (0,u.R_)(e((0,c.up)({name:s,email:m,phone:p})),"Validating...")).error)return a("/")}catch(e){(0,u.Ax)("Failed to save user data")}};return(0,l.jsx)("div",{className:"full-container addemp-wrapper",children:(0,l.jsxs)("div",{className:"custom-container",children:[(0,l.jsx)("div",{className:"back-button",children:(0,l.jsx)(d.A,{to:"/adminpanel"})}),(0,l.jsx)("span",{className:"main-heading heading-both",children:"Add User"}),(0,l.jsx)("form",{onSubmit:j,children:(0,l.jsx)("div",{className:"row",children:(0,l.jsxs)("div",{className:"col-md-12 ",id:"its_number_wrapper",children:[(0,l.jsxs)("div",{className:"mb-3 row",children:[(0,l.jsx)("div",{className:"col-md-6 mb-3",children:(0,l.jsxs)("div",{className:"form-group float-right",children:[(0,l.jsx)("label",{children:"Full Name"}),(0,l.jsx)("input",{className:"form-input_field",type:"text",onChange:e=>o(e.target.value),placeholder:"Type Full Name",value:s})]})}),(0,l.jsx)("div",{className:"col-md-6",children:(0,l.jsxs)("div",{className:"form-group float-left",children:[(0,l.jsx)("label",{children:"Email Id"}),(0,l.jsx)("input",{className:"form-input_field",type:"email",onChange:e=>h(e.target.value),placeholder:"Type Email Id",value:m})]})}),(0,l.jsx)("div",{className:"col-md-12",children:(0,l.jsxs)("div",{className:"form-group mobile_no",children:[(0,l.jsx)("label",{children:"Contact number"}),(0,l.jsx)("input",{className:"form-input_field",type:"text",onChange:e=>x(e.target.value),placeholder:"Type Mobile Number",value:p})]})})]}),(0,l.jsx)(n.jn,{type:"submit",background:"transparent",height:"40px",children:"Submit Data"})]})})})]})})}},59561:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var l=s(37876);s(14232);var r=s(89099),t=s(64329);let i=e=>{let{to:a=-1,...s}=e,i=(0,r.useRouter)();return(0,l.jsx)("button",{type:"button","aria-label":"go-back",onClick:()=>-1===a?i.back():i.push(a),children:(0,l.jsx)(t.Z3,{...s})})}},88278:(e,a,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/users/AddUser",function(){return s(49342)}])}},e=>{var a=a=>e(e.s=a);e.O(0,[636,6593,8792],()=>a(88278)),_N_E=e.O()}]);
//# sourceMappingURL=AddUser-26c71ad29764728f.js.map