text: (this["webpackJsonpgoit-react-hw-09-phonebook"]=this["webpackJsonpgoit-react-hw-09-phonebook"]||[]).push([[5],{99:function(e,a,t){"use strict";t.r(a);var r=t(0),n=t(90),s=t(97),c=t(100),o=t(8),l=t(12),i=t(1),b={form:{width:"200"}};function j(){var e=Object(o.b)(),a=Object(r.useState)(""),t=Object(n.a)(a,2),j=t[0],d=t[1],m=Object(r.useState)(""),u=Object(n.a)(m,2),h=u[0],p=u[1],O=Object(r.useState)(""),x=Object(n.a)(O,2),w=x[0],f=x[1],v=function(e){var a=e.target,t=a.name,r=a.value;switch(t){case"name":d(r);break;case"email":p(r);break;case"password":f(r);break;default:console.warn("\u0422\u0438\u043f \u043f\u043e\u043b\u044f name - ${name} \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f")}};return Object(i.jsx)("div",{style:b.form,children:Object(i.jsxs)(s.a,{onSubmit:function(a){a.preventDefault(),e(l.a.register({name:j,email:h,password:w})),d(""),p(""),f("")},children:[Object(i.jsxs)(s.a.Group,{controlId:"formBasicEmail",children:[Object(i.jsx)(s.a.Label,{children:"UserName"}),Object(i.jsx)(s.a.Control,{type:"text",placeholder:"Enter your name",name:"name",value:j,onChange:v})]}),Object(i.jsxs)(s.a.Group,{controlId:"formBasicEmail",children:[Object(i.jsx)(s.a.Label,{children:"Email address"}),Object(i.jsx)(s.a.Control,{type:"email",placeholder:"Enter email",name:"email",value:h,onChange:v})]}),Object(i.jsxs)(s.a.Group,{controlId:"formBasicPassword",children:[Object(i.jsx)(s.a.Label,{children:"Password"}),Object(i.jsx)(s.a.Control,{type:"password",placeholder:"Password",name:"password",value:w,onChange:v})]}),Object(i.jsx)(c.a,{variant:"primary",type:"submit",children:"Submit"})]})})}a.default=function(){return Object(i.jsx)(i.Fragment,{children:Object(i.jsx)(j,{})})}}}]);
  //# sourceMappingURL=registration-view.33771be3.chunk.js.map