(window.webpackJsonp=window.webpackJsonp||[]).push([[141],{1777:function(e,t,n){"use strict";n.r(t);var s=n(3886),a=n(2302);for(var l in a)["default"].indexOf(l)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(l);var i=n(0),o=n(3366),r=n.n(o),u=Object(i.a)(a.default,s.a,s.b,!1,null,null,null);"function"==typeof r.a&&r()(u),t.default=u.exports},2012:function(e,t,n){"use strict";var s=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.resetMessage=t.saveMessage=t.getMessage=void 0;var a=s(n(78)),l="/CMD_SUSPENSION_MESSAGE",i=a.default.get({url:l,id:"SUSPENSION_MESSAGE",schema:{level:{type:String,required:!1,default:"1"}}});t.getMessage=i;var o=a.default.post({url:l,params:{save:!0},schema:{level:a.default.REQUIRED_STRING,subject:a.default.REQUIRED_STRING,message:a.default.REQUIRED_STRING,notify:a.default.OPTIONAL_BOOL,email_only:a.default.OPTIONAL_BOOL}});t.saveMessage=o;var r=a.default.post({url:l,params:{reset:!0},schema:{level:a.default.REQUIRED_STRING}});t.resetMessage=r},2302:function(e,t,n){"use strict";n.r(t);var s=n(2303),a=n.n(s);for(var l in s)["default"].indexOf(l)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(l);t.default=a.a},2303:function(e,t,n){"use strict";n(16),n(14),n(23),n(25),n(18),n(6);var s=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var r=i?Object.getOwnPropertyDescriptor(e,o):null;r&&(r.get||r.set)?Object.defineProperty(a,o,r):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(n(2012));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}var i={preload:a.getMessage,api:a.getMessage,data:function(){return{subject:"",message:"",notify:!1,level:"1",emailOnly:!1}},computed:{levels:function(){return!!this.$state.app.user.canBe("admin")&&{1:this.$gettext("User"),2:this.$gettext("Reseller"),3:this.$gettext("Admin")}}},watch:{level:"load"},created:function(){this.getDataFromApi()},methods:{reset:function(){a.resetMessage({level:this.level})},save:function(){a.saveMessage({level:this.level,subject:this.subject,message:this.message,notify:this.notify,email_only:this.emailOnly})},getDataFromApi:function(){this.subject=this.$api.subject,this.message=this.$api.message,this.notify="yes"===this.$api.settings.notify},load:function(){a.getMessage({level:this.level}).then(this.getDataFromApi)}}};t.default=i},3366:function(e,t){},3886:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a}));var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("app-page",{attrs:{actions:[{handler:e.reset,label:e.$gettext("Reset"),icon:"#console",theme:"danger"}]}},[n("ui-button",{attrs:{slot:"header:buttons",theme:"danger"},on:{click:e.reset},slot:"header:buttons"},[n("translate",[e._v("Reset")])],1),e._v(" "),n("app-page-section",[e.levels?n("ui-form-element",[n("translate",{attrs:{slot:"title"},slot:"title"},[e._v("\n                User Level\n            ")]),e._v(" "),n("input-select",{attrs:{slot:"content",options:e.levels},slot:"content",model:{value:e.level,callback:function(t){e.level=t},expression:"level"}})],1):e._e(),e._v(" "),n("ui-form-element",[n("translate",{attrs:{slot:"title"},slot:"title"},[e._v("\n                Subject\n            ")]),e._v(" "),n("input-text",{attrs:{slot:"content"},slot:"content",model:{value:e.subject,callback:function(t){e.subject=t},expression:"subject"}})],1),e._v(" "),n("ui-form-element",[n("translate",{attrs:{slot:"title"},slot:"title"},[e._v("\n                Message\n            ")]),e._v(" "),n("input-textarea",{attrs:{slot:"content"},slot:"content",model:{value:e.message,callback:function(t){e.message=t},expression:"message"}})],1),e._v(" "),n("ui-form-element",{attrs:{underline:!1}},[n("span",{attrs:{slot:"title"},slot:"title"}),e._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("input-checkbox",{model:{value:e.notify,callback:function(t){e.notify=t},expression:"notify"}},[e._v("\n                    Notify\n                ")]),e._v(" "),n("input-checkbox",{directives:[{name:"margin",rawName:"v-margin:left",value:1,expression:"1",arg:"left"}],model:{value:e.emailOnly,callback:function(t){e.emailOnly=t},expression:"emailOnly"}},[n("translate",[e._v("Email Only")])],1)],1)]),e._v(" "),n("ui-button",{attrs:{slot:"footer:buttons",theme:"safe",size:"big"},on:{click:e.save},slot:"footer:buttons"},[n("translate",[e._v("Save")])],1)],1)],1)},a=[]}}]);