(this["webpackJsonpmetta-frontend"]=this["webpackJsonpmetta-frontend"]||[]).push([[12],{1092:function(e,t,r){},1105:function(e,t,r){"use strict";r.r(t);var n=r(20),s=r(2),c=r.n(s),a=r(33),i=r(31),o=r(88),u=r(56),l=r(60),d={StarCount:0,UserComments:""},j=r(19),b=j.d({UserComments:j.f().required("User Comments is required"),StarCount:j.c().min(1,"Select rating, it is required")}),m=r(48),h=r(57),O=r(30),f=(r(1092),r(1));t.default=Object(i.b)((function(e){return{submitting:Object(O.p)(e),errorMessage:Object(O.e)(e),feedbackSubmissionStatus:Object(O.f)(e)}}),(function(e){return{doSubmit:function(t){return e(Object(h.l)(t))},doClearErrors:function(){return e(Object(h.c)())}}}))((function(e){var t=e.submitting,r=e.errorMessage,i=e.feedbackSubmissionStatus,j=e.doClearErrors,h=e.doSubmit;Object(s.useEffect)((function(){return function(){j()}}),[]);var O=Object(s.useState)(Array(5).fill(!1)),x=Object(n.a)(O,2),v=x[0],g=x[1],C=Object(u.a)((function(){return Object(f.jsx)("button",{type:"submit",name:"submit",className:"p-2 next btn-register ml-3 mt-3",children:"POST"})}));return Object(f.jsx)(o.a,{children:Object(f.jsx)("div",{className:"body",children:Object(f.jsxs)("div",{className:"containers",children:[Object(f.jsx)("div",{className:"post ".concat(i?"":"hide"),children:Object(f.jsx)("div",{className:"text",children:"Thanks for rating us!"})}),Object(f.jsx)(a.d,{initialValues:d,validationSchema:b,onSubmit:function(e){console.log(e),h(e)},children:function(e){return Object(f.jsxs)(a.c,{className:"msform",children:[Object(f.jsxs)("div",{className:"star-widget ".concat(i?"hide":""),children:[Object(f.jsx)("div",{className:"row",children:v.map((function(t,r){var n="rate-".concat(r+1);return Object(f.jsxs)(c.a.Fragment,{children:[Object(f.jsx)("input",{type:"radio",name:"StarCount",id:n,value:r+1,onChange:function(t){return function(e,t){for(var r=e.target.value,n=v.map((function(){return!1})),s=0;s<r;s++)n[s]=!0;g(n),t.handleChange(e)}(t,e)}}),Object(f.jsx)("label",{htmlFor:n,className:"".concat(v[r]?"checked":"unchecked"),children:Object(f.jsx)(l.a,{icon:"star"})})]},"star-".concat(r))}))}),Object(f.jsx)("header",{}),e.errors.StarCount?Object(f.jsx)("div",{className:"validation-error",children:e.errors.StarCount}):null,Object(f.jsx)("div",{className:"textarea",children:Object(f.jsx)("textarea",{cols:"30",rows:"10",name:"UserComments",placeholder:"Describe your experience..",onChange:e.handleChange})}),e.errors.UserComments?Object(f.jsx)("div",{className:"validation-error",children:e.errors.UserComments}):null,Object(f.jsx)(C,{isLoading:t,defaultHeight:!1})]}),r?Object(f.jsx)(m.a,{message:r,onclose:j}):null]})}})]})})})}))}}]);
//# sourceMappingURL=12.c5ac9fd1.chunk.js.map