define("discourse/plugins/discourse-bulk-messages/discourse/controllers/admin-plugins-discourse-bulk-messages",["exports","discourse/lib/ajax","discourse/lib/ajax-error","@ember/object/computed"],(function(s,e,n,l){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var t=["external_ids","usernames"],u=Ember.Controller.extend({messageUsersEmpty:(0,l.empty)("pm_users"),titleEmpty:(0,l.empty)("pm_title"),bodyEmpty:(0,l.empty)("pm_body"),submitDisabled:(0,l.or)("messageUsersEmpty","titleEmpty","bodyEmpty","loading"),init:function(){this._super.apply(this,arguments);var s=t[0],e=t.map((function(s){return{name:I18n.t("discourse_bulk_messages.user_modes.".concat(s)),value:s}}));this.setProperties({currentUserListMode:s,userListModes:e})},actions:{action:function(){var s=this;this.set("loading",!0),this.set("success",!1);var l={anonymous:this.get("anonymous"),closed:this.get("closed"),group:this.get("pm_group"),raw:this.get("pm_body"),title:this.get("pm_title")};l[this.get("currentUserListMode")]=this.get("pm_users").split("\n"),(0,e.ajax)("/admin/plugins/discourse-bulk-messages",{data:l,method:"POST"}).then((function(){s.set("success",!0)})).catch(n.popupAjaxError).finally((function(){s.set("loading",!1)}))}}});s.default=u})),define("discourse/plugins/discourse-bulk-messages/discourse/discourse-bulk-messages-route-map",["exports"],(function(s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;s.default={resource:"admin.adminPlugins",path:"/plugins",map:function(){this.route("discourse-bulk-messages")}}})),Ember.TEMPLATES["javascripts/admin/plugins-discourse-bulk-messages"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"div",true],[10,"class","control-group"],[8],[0,"\\n\\n  "],[7,"h3",true],[8],[1,[28,"i18n",["discourse_bulk_messages.users.title"],null],false],[9],[0,"\\n\\n  "],[7,"div",true],[10,"class","controls"],[8],[0,"\\n    "],[7,"label",true],[10,"for","bulk-messages-user-mode"],[8],[1,[28,"i18n",["discourse_bulk_messages.users.mode"],null],false],[9],[0,"\\n    "],[1,[28,"combo-box",null,[["valueProperty","content","value","id","onChange"],["value",[24,["userListModes"]],[24,["currentUserListMode"]],"bulk-messages-user-mode",[28,"action",[[23,0,[]],[28,"mut",[[24,["currentUserListMode"]]],null]],null]]]],false],[0,"\\n  "],[9],[0,"\\n\\n  "],[7,"br",true],[8],[9],[0,"\\n\\n  "],[7,"div",true],[10,"class","controls"],[8],[0,"\\n    "],[7,"label",true],[8],[1,[28,"i18n",["discourse_bulk_messages.users.input"],null],false],[9],[0,"\\n    "],[1,[28,"textarea",null,[["value"],[[24,["pm_users"]]]]],false],[0,"\\n  "],[9],[0,"\\n\\n  "],[7,"br",true],[8],[9],[0,"\\n\\n  "],[7,"h3",true],[8],[1,[28,"i18n",["discourse_bulk_messages.message.title"],null],false],[9],[0,"\\n\\n  "],[7,"div",true],[10,"class","controls"],[8],[0,"\\n    "],[7,"label",true],[8],[1,[28,"i18n",["discourse_bulk_messages.message.message_title"],null],false],[9],[0,"\\n    "],[1,[28,"input",null,[["value"],[[24,["pm_title"]]]]],false],[0,"\\n  "],[9],[0,"\\n\\n  "],[7,"div",true],[10,"class","controls"],[8],[0,"\\n    "],[7,"label",true],[8],[1,[28,"i18n",["discourse_bulk_messages.message.message_body"],null],false],[9],[0,"\\n    "],[1,[28,"d-editor",null,[["value"],[[24,["pm_body"]]]]],false],[0,"\\n  "],[9],[0,"\\n\\n  "],[7,"br",true],[8],[9],[0,"\\n\\n  "],[7,"h3",true],[8],[1,[28,"i18n",["discourse_bulk_messages.options.title"],null],false],[9],[0,"\\n\\n  "],[7,"div",true],[10,"class","controls"],[8],[0,"\\n    "],[7,"label",true],[8],[1,[28,"i18n",["discourse_bulk_messages.options.group"],null],false],[9],[0,"\\n    "],[1,[28,"input",null,[["value"],[[24,["pm_group"]]]]],false],[0,"\\n  "],[9],[0,"\\n\\n  "],[7,"div",true],[10,"class","controls"],[8],[0,"\\n    "],[7,"label",true],[8],[0,"\\n      "],[1,[28,"input",null,[["type","checked"],["checkbox",[24,["anonymous"]]]]],false],[0,"\\n      "],[1,[28,"i18n",["discourse_bulk_messages.options.anonymous"],null],false],[0,"\\n    "],[9],[0,"\\n  "],[9],[0,"\\n\\n  "],[7,"div",true],[10,"class","controls"],[8],[0,"\\n    "],[7,"label",true],[8],[0,"\\n      "],[1,[28,"input",null,[["type","checked"],["checkbox",[24,["closed"]]]]],false],[0,"\\n      "],[1,[28,"i18n",["discourse_bulk_messages.options.closed"],null],false],[0,"\\n    "],[9],[0,"\\n  "],[9],[0,"\\n\\n  "],[7,"br",true],[8],[9],[7,"br",true],[8],[9],[0,"\\n\\n  "],[7,"div",true],[10,"class","controls"],[8],[0,"\\n    "],[1,[28,"d-button",null,[["class","action","disabled","label"],["btn-default",[28,"action",[[23,0,[]],"action"],null],[24,["submitDisabled"]],"discourse_bulk_messages.submit"]]],false],[0,"\\n  "],[9],[0,"\\n\\n  "],[1,[28,"conditional-loading-spinner",null,[["condition"],[[24,["loading"]]]]],false],[0,"\\n\\n  "],[7,"br",true],[8],[9],[0,"\\n\\n"],[4,"if",[[24,["success"]]],null,{"statements":[[0,"    "],[7,"div",true],[10,"class","alert alert-success"],[8],[0,"\\n      "],[7,"p",true],[8],[1,[28,"i18n",["discourse_bulk_messages.success"],null],false],[9],[0,"\\n    "],[9],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"javascripts/discourse/templates/admin/plugins-discourse-bulk-messages"}});
//# sourceMappingURL=https://doy2mn9upadnk.cloudfront.net/assets/plugins/discourse-bulk-messages-810235e1b064e86a4433b625476944f2bab7e2ea30165680ded3d259adcb6d3f.js.map