(window.webpackJsonp=window.webpackJsonp||[]).push([[169],{1780:function(e,t,a){"use strict";a.r(t);var r=a(3889),n=a(2310);for(var c in n)["default"].indexOf(c)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(c);var o=a(0),s=a(3376),u=a.n(s),i=Object(o.a)(n.default,r.a,r.b,!1,null,null,null);"function"==typeof u.a&&u()(i),t.default=i.exports},2310:function(e,t,a){"use strict";a.r(t);var r=a(2311),n=a.n(r);for(var c in r)["default"].indexOf(c)<0&&function(e){a.d(t,e,(function(){return r[e]}))}(c);t.default=n.a},2311:function(e,t,a){"use strict";a(7),a(10),a(5),a(6),a(8),a(11);var r=a(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(36)),c=r(a(2)),o=r(a(37));a(34),a(13),a(15);var s=a(1925),u=r(a(2017));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function p(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?i(Object(a),!0).forEach((function(t){(0,c.default)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var l,f={preload:s.getPackages,api:[{command:s.getPackages,bind:{"response.rows":"packages"}}],components:{UserPackage:u.default},data:function(){return{packageData:{},packageName:"newpackage"}},computed:{packages:function(){return this.$api.packages.map((function(e){return e.package}))}},methods:{updatePackage:(l=(0,o.default)(n.default.mark((function e(){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.updatePackage)(p({packagename:this.packageName},this.packageData));case 2:e.sent&&this.$router.push({name:"reseller/user-packages"});case 4:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)}),validateName:function(e){return!e||!this.packages.includes(e)}}};t.default=f},3376:function(e,t){},3889:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return n}));var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("app-page",[a("app-page-section",[a("user-package",{attrs:{package:null},on:{update:function(t){e.packageData=t}}}),e._v(" "),a("ui-form-element",{key:"user-package-name",attrs:{group:"userPackage",validators:{required:!0,validateName:e.validateName,regex:/^[a-zA-Z0-9\-\_]+$/,maxLength:20}}},[a("translate",{attrs:{slot:"title"},slot:"title"},[e._v("\n                Package Name\n            ")]),e._v(" "),a("input-text",{attrs:{slot:"content"},slot:"content",model:{value:e.packageName,callback:function(t){e.packageName=t},expression:"packageName"}}),e._v(" "),a("translate",{attrs:{slot:"error:regex"},slot:"error:regex"},[e._v("\n                Package name should not contain special characters\n            ")]),e._v(" "),a("translate",{attrs:{slot:"error:validateName"},slot:"error:validateName"},[e._v("\n                Package already exists\n            ")])],1)],1),e._v(" "),a("ui-button",{attrs:{slot:"footer:buttons","validate-group":"userPackage",theme:"safe"},on:{click:e.updatePackage},slot:"footer:buttons"},[a("translate",[e._v("Save")])],1)],1)},n=[]}}]);