(this["webpackJsonpmetta-frontend"]=this["webpackJsonpmetta-frontend"]||[]).push([[13],{1072:function(e,s,t){},1099:function(e,s,t){"use strict";t.r(s);var c=t(20),r=t(2),n=t(31),i=t(67),a=t(62),o=t(33),l=t(57),d=t(26),m=t(48),j=t(56),b=t(472),u=t.p+"static/media/illustration.c9a5577e.svg",x=t.p+"static/media/middle-caption.43089080.svg",h=t.p+"static/media/bottom-icons-text.f99bdd30.svg",O=t(44),f=function(e){return e.user.currentUser},g=function(e){return e.user.errorMessage},v=function(e){return e.user.isFetching},p=function(e){return e.user.showCaseHistory},N=(Object(O.a)(f,(function(e){return e?e.menu:void 0})),t(19)),w=N.d({username:N.f().required("Username is required"),password:N.f().required("Password is required")}),y=(t(1072),t(38)),k=t(1);s.default=Object(n.b)((function(e){return{currentUser:f(e),errorMessage:g(e),isFetching:v(e),showCaseHistory:p(e)}}),(function(e){return{doLogin:function(s,t){return e(Object(l.a)({UserId:s,Password:t}))},doDismissError:function(){return e(Object(l.c)())}}}))((function(e){var s=e.currentUser,t=e.isFetching,n=e.showCaseHistory,l=e.errorMessage,O=e.doLogin,f=e.doDismissError,g=Object(r.useState)(!1),v=Object(c.a)(g,2),p=v[0],N=v[1],S=function(){N(!p)};Object(i.h)().state;if(s)return n?Object(k.jsx)(i.a,{to:"/case-history"}):Object(k.jsx)(i.a,{to:"/dashboard/".concat(y.a.GRAPH_LIST.route)});var U=Object(j.a)((function(){return Object(k.jsx)("button",{type:"submit",className:"btn-login",children:"Submit"})}));return Object(k.jsxs)("section",{className:"signin-content",children:[Object(k.jsxs)("div",{className:"mx-5",children:[Object(k.jsxs)("div",{className:"row",children:[Object(k.jsx)("div",{className:"col-md-3 img-responsive",children:Object(k.jsx)("img",{src:u,className:"mt-4 illustrations",alt:"none"})}),Object(k.jsx)("div",{className:"col-md-5",children:"\xa0"}),Object(k.jsx)("div",{className:"col-md-4",children:Object(k.jsxs)("div",{className:"form-box ml-3",children:[Object(k.jsx)("div",{className:"d-flex justify-content-center",children:Object(k.jsx)("img",{src:b.a,className:"img-fluid mt-0",alt:"none"})}),Object(k.jsx)(o.d,{initialValues:{username:"",password:""},validationSchema:w,onSubmit:function(e){var s=e.username,t=e.password;O(s.trim(),t.trim())},children:function(e){return Object(k.jsx)("div",{children:Object(k.jsxs)(o.c,{children:[Object(k.jsx)("div",{className:"form-row",children:Object(k.jsx)("div",{className:"col form-group",children:Object(k.jsx)(d.e,{label:"Username",name:"username",type:"text"})})}),Object(k.jsx)("div",{className:"form-row",children:Object(k.jsx)("div",{className:"col form-group",children:Object(k.jsx)(d.e,{label:"Password",name:"password",type:"".concat(p?"text":"password"),fonticon:"".concat(p?"eye-slash":"eye"),groupiconaction:S})})}),Object(k.jsx)("div",{className:"text-center pt-4",children:Object(k.jsx)(U,{isLoading:t,defaultHeight:!1})})]})})}}),Object(k.jsxs)("div",{className:"d-flex pt-2 remember-box",children:[Object(k.jsxs)("div",{className:"form-check",children:[Object(k.jsx)("input",{type:"checkbox",className:"form-check-input checkbox",name:"remember"}),Object(k.jsx)("label",{htmlFor:"remember",children:"Remember me"})]}),Object(k.jsx)("span",{className:"ml-auto",children:Object(k.jsx)(a.b,{to:"forgot-password",children:"Forgot Password?"})})]}),Object(k.jsx)("div",{className:"col-md-12 text-center mt-4",children:Object(k.jsxs)("p",{className:"login-txt mb-0",children:["Don\u2019t have an account?\xa0",Object(k.jsx)(a.b,{to:"register",children:"Sign up"})," now"]})})]})})]}),Object(k.jsx)("div",{className:"row",children:Object(k.jsx)("div",{className:"col",children:Object(k.jsx)("img",{src:x,className:"mt-1  login-bottom-row-1",alt:"none"})})}),Object(k.jsx)("div",{className:"row",children:Object(k.jsx)("div",{className:"col",children:Object(k.jsx)("img",{src:h,className:"mt-3  login-bottom-row-2",alt:"none"})})})]}),l?Object(k.jsx)(m.a,{message:l,onclose:function(e){f()}}):null,Object(k.jsx)("br",{})]})}))}}]);
//# sourceMappingURL=13.d49e66cc.chunk.js.map