System.register(["./p-343b3b10.system.js","./p-97c19fd0.system.js","./p-4785c63b.system.js","./p-dfb1d72b.system.js","./p-ebdd1444.system.js","./p-a56cdd14.system.js","./p-d86a8e66.system.js"],(function(e){"use strict";var r,t,s,n,i;return{setters:[function(e){r=e.r;t=e.h},function(e){s=e.T},function(e){n=e.V},function(e){i=e.V},function(){},function(){},function(){}],execute:function(){var o=function(e){return[new s("firstName","","First name","").setValue(e.firstName).setErrorTitle("Name").require(),new s("lastName","","Last name","").setValue(e.lastName).setErrorTitle("Surname").require(),new s("email","","Email","","email").setValue(e.email).setErrorTitle("Email").addInterceptor("onSubmit",new n).require(),new s("password","","Password","","password").setErrorTitle("Password").addInterceptor("onSubmit",new i(6,24)).require()]};function a(e){if(!e){return undefined}if(e.status===401){return["Credentials are not valid."]}else{return["Unexpected error."]}}var u=e("kimlik_register_form",function(){function e(e){var t=this;r(this,e);this.data={};this.onSubmit=function(e){var r=e.detail.values;var s=r.email,n=r.firstName,i=r.lastName,o=r.password;t.progressing=true;t.api.register(s,n,i,o).then(t.onSucceed,t.onError)};this.onSucceed=function(e){t.api.addAuthInterceptor(e.jwt);t.progressing=false;if(t.onRegister){t.onRegister(e)}if(t.redirect){window.location=t.redirect}};this.onError=function(e){t.error=e;t.progressing=false}}e.prototype.render=function(){var e=this,r=e.data,s=e.error,n=e.progressing;return t("doldurma-form",{fields:o(r),onSubmit:this.onSubmit,submitButtonLabel:"Register",progressing:n,formErrors:a(s)})};return e}())}}}));