Type.registerNamespace("KSP.Web");KSP.Web.CartController=function(){KSP.Web.CartController.initializeBase(this);this._cartService=null;this._updateCompleteDelegate=null};KSP.Web.CartController.prototype={initialize:function(){KSP.Web.CartController.callBaseMethod(this,"initialize");this._cartService=new KSP.Web.WebServices.ShoppingCartService();this._updateCompleteDelegate=Function.createDelegate(this,this._updateComplete)},dispose:function(){delete this._cartService;delete this._updateCompleteDelegate;KSP.Web.CartController.callBaseMethod(this,"dispose")},addItem:function(B,A){this._cartService.AddItem(B,A,this._updateCompleteDelegate)},addItems:function(A,B){this._cartService.AddItem(A,B,this._updateCompleteDelegate)},addWorkshop:function(A,B){this._cartService.AddWorkshop(A,B,this._updateCompleteDelegate)},removeItem:function(A){this._cartService.RemoveItem(A,this._updateCompleteDelegate)},getCurrentCart:function(A){this._cartService.GetCurrentCart(A)},_updateComplete:function(A){var B=new KSP.Web.CartControllerEventArgs(A);this._onCartUpdated(B)},add_cartUpdated:function(A){this.get_events().addHandler("cartUpdated",A)},remove_cartUpdated:function(A){this.get_events().removeHandler("cartUpdated",A)},_onCartUpdated:function(B){var A=this.get_events().getHandler("cartUpdated");if(A){A(this,B)}document.body.style.cursor="default"}};KSP.Web.CartController.registerClass("KSP.Web.CartController",Sys.Component);KSP.Web.CartControllerEventArgs=function(A){this._shoppingCart=A};KSP.Web.CartControllerEventArgs.prototype={get_shoppingCart:function(){return this._shoppingCart}};KSP.Web.CartControllerEventArgs.registerClass("KSP.Web.CartControllerEventArgs",Sys.EventArgs);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};
