(window.webpackJsonpPlesk=window.webpackJsonpPlesk||[]).push([["app/convert-customers-to-resellers"],{1097:function(e,t,s){"use strict";s.r(t);var o=s(145);class c extends o.ConfirmationPopupManager.PopupForm{_initConfiguration(e){super._initConfiguration({locale:o.Locale.getSection("admin.components.confirmations.customer"),...e})}_onSuccessPreparePopup(e){this._clearMessages(),this._response=e,"success"===this._response.status?(document.getElementById(this._formBoxAreaId).innerHTML="",document.getElementById(this._formListAreaId).innerHTML='<table cellspacing="0" width="100%">'+'<tbody id="'.concat(this._formListItemsAreaId,'">')+"</tbody></table>",$H(this._response.customers).each(({value:e})=>{this.addCustomer(e)})):this._addErrorMessage(this._response.message)}addCustomer(e){this._itemClass="odd"===this._itemClass?"even":"odd";const t='<tr class="'.concat(this._itemClass,'">')+"<td><b>".concat(Object(o.escapeHtml)(e.name),"</b></td>")+"<td>".concat(this.getPlanSelectorHtml(e),"</td>")+"</tr>";Object(o.render)(document.getElementById(this._formListItemsAreaId),t)}getPlanSelectorHtml(e){let t='<select class="customers" name="customers['.concat(e.id,']" id="customers-select-').concat(e.id,'" title="').concat(e.id,'">');return $H(this._response.plans).each(({value:e})=>{t+='<option value="'.concat(e.id,'">').concat(Object(o.escapeHtml)(e.name),"</option>")}),t+="</select>",t}_getAdditionalParams(e){return document.querySelectorAll(".customers").forEach(({title:t,value:s})=>{e.set("customers[".concat(t,"]"),s)}),e}}t.default=c}}]);
//# sourceMappingURL=convert-customers-to-resellers.js.map?dee7565b8afab9a3e5f3