var Lang;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r,u){this.$scope=n;this.$window=t;this.$location=i;this.$timeout=r;this.langMakeAppointmentService=u;n.vm=this;this.formSubmitted=!1;this.submitSuccess=!1;this.makeAppointmentForm;this.appointment;this.confirmAlert;this.confirmMessage="Thank you.  Someone from our Brokerage team will be in touch via your preferred method soon."}return n.prototype.submitForm=function(n){var t=this;this.formSubmitted=!0;console.log("sending",this.appointment);n.$valid&&(console.log("Submit form"),this.langMakeAppointmentService.submitAppointment(this.appointment).then(function(n){console.log("success: results",n);t.submitSuccess=!0;t.$window.alert(t.confirmMessage);t.$window.location.replace("/brokerage")},function(n){console.log("error: reason",n)}))},n.$inject=["$scope","$window","$location","$timeout","langMakeAppointmentService"],n}();n.Controller=t})(t=n.MakeAppointment||(n.MakeAppointment={}))})(Lang||(Lang={}));Lang.App.controller("langMakeAppointment",Lang.MakeAppointment.Controller),function(n){var t;(function(n){var t=function(){function n(n,t){this.$http=n;this.$q=t}return n.prototype.submitAppointment=function(n){var t=this.$q.defer();return this.$http({url:"/api/ContactBroker",method:"POST",data:n}).success(function(n,i,r){t.resolve({data:n,headers:r.call("content-range")})}).error(function(){t.reject()}),t.promise},n.$inject=["$http","$q"],n}();n.Service=t})(t=n.MakeAppointment||(n.MakeAppointment={}))}(Lang||(Lang={}));Lang.App.service("langMakeAppointmentService",Lang.MakeAppointment.Service),function(n){var t;(function(n){var t=function(){function n(n,t,i,r){this.$scope=n;this.$window=t;this.$location=i;this.$timeout=r;n.vm=this;this.test=!1}return n.prototype.testMethod=function(n){console.log("broker:",n);this.test=!0},n.$inject=["$scope","$window","$location","$timeout"],n}();n.Controller=t})(t=n.Brokerage||(n.Brokerage={}))}(Lang||(Lang={}));Lang.App.controller("langBrokerage",Lang.Brokerage.Controller)