(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-56900dea"],{"02bb":function(e,t,s){"use strict";var n=s("653c"),a=s.n(n);a.a},"5bce":function(e,t,s){"use strict";s.d(t,"a",(function(){return d}));var n=s("d4ec"),a=s("bee2"),r=s("262e"),o=s("2caf"),i=s("ade3"),c=s("fce9"),d=function(e){Object(r["a"])(s,e);var t=Object(o["a"])(s);function s(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(n["a"])(this,s),t.call(this,s.normalize(s.base,e),a,r)}return Object(a["a"])(s,[{key:"forgotPassword",value:function(e){var t={username:e};return this.post("/forgot-password",t)}},{key:"newPassword",value:function(e){return this.post("/newPassword",e)}}],[{key:"build",value:function(){return new this(this.resource)}}]),s}(c["a"]);Object(i["a"])(d,"base","/api/password"),Object(i["a"])(d,"resource","")},"653c":function(e,t,s){},a8d4:function(e,t,s){},b1ca:function(e,t,s){"use strict";var n=s("a8d4"),a=s.n(n);a.a},d69b:function(e,t,s){e.exports=s.p+"img/logo-white.038cb870.svg"},ec6c:function(e,t,s){"use strict";s.r(t);var n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("newPassword")],1)},a=[],r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"main-login"},[n("div",{staticClass:"container-login"},[n("img",{attrs:{src:s("d69b"),alt:"Odorata"}}),n("b-form",{on:{submit:function(t){return t.preventDefault(),e.sendForm(t)}}},[n("b-form-group",[n("label",{attrs:{for:""}},[e._v("Digite sua nova senha")]),n("b-form-input",{attrs:{type:"password",required:"",placeholder:"Nova senha"},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}})],1),n("b-form-group",[n("b-form-input",{attrs:{type:"password",required:"",placeholder:"confirmar senha"},model:{value:e.password_confirm,callback:function(t){e.password_confirm=t},expression:"password_confirm"}})],1),e.validate&&e.password.length<6?n("p",{staticClass:"text center text-danger"},[e._v(" Senha muito curta ")]):e._e(),e.validate&&!e.isValid?n("p",{staticClass:"text center text-danger"},[e._v(" Senha não conferem ")]):e._e(),n("b-button",{attrs:{type:"submit",disabled:e.sending}},[n("b-spinner",{directives:[{name:"show",rawName:"v-show",value:e.sending,expression:"sending"}],attrs:{small:"",type:"grow"}}),e._v(" Alterar Senha ")],1)],1)],1)])},o=[],i=s("5bce"),c=i["a"].build(),d={props:["token","email"],data:function(){return{password:"",password_confirm:"",sending:!1,validate:!1}},computed:{isValid:function(){return!(this.password.length<6)&&this.password==this.password_confirm}},methods:{sendForm:function(){if(this.validate=!0,this.isValid){this.sending=!0;var e=this;c.newPassword({email:this.$route.params.email,token:this.$route.params.token,password:this.password,password_confirm:this.password_confirm}).then((function(t){e.sending=!1,e.$fire({title:"Senha alterada com sucesso",icon:"success"}),e.$router.push({name:"Login"})})).catch((function(t){var s=JSON.parse(t.response.data);e.$fire({title:"Senha não alterada",icon:"warning",text:s.msg}),e.sending=!1}))}}},mounted:function(){}},u=d,l=(s("b1ca"),s("02bb"),s("2877")),p=Object(l["a"])(u,r,o,!1,null,"5d4ca87e",null),f=p.exports,w={components:{newPassword:f}},m=w,h=Object(l["a"])(m,n,a,!1,null,null,null);t["default"]=h.exports}}]);
//# sourceMappingURL=chunk-56900dea.20d7a9f4.js.map