(window.webpackJsonpPlesk=window.webpackJsonpPlesk||[]).push([["views/admin/notifications/panel-notifications-settings"],{1105:function(t,e,s){"use strict";s.r(e);var n=s(155),i=s(276),a=s.n(i),o=s(145),c=s(156);const l=({settings:t})=>{const[e,s]=Object(n.useState)(!1),[i,a]=Object(n.useState)(t.sendToAdmin);return Object(n.createElement)(c.Switch,{checked:i,onChange:async()=>{s(!0);const{status:e,statusMessages:n}=await o.api.post("/admin/notifications/panel-notifications-toggle/id/".concat(t.id));Object(o.clearStatusMessages)(),n.forEach(({status:t,content:e})=>{Object(o.addStatusMessage)(t,e)}),s(!1),"success"===e&&a(!i)},loading:e})};l.propTypes={settings:a.a.object.isRequired},e.default=({notificationsList:t})=>{const e=o.Locale.getSection("admin.controllers.notifications.template-settings-list");new o.Hint({renderTo:"panel-notifications-list",hint:e.lmsg("hint")}),new o.Panel({cls:"list-box",renderTo:"panel-notifications-list",items:[new o.List({...t,id:"notifications-list",searchOveral:"name",disabledSelectHint:e.lmsg("disabledSelectHint"),columns:[{header:e.lmsg("name"),sortable:!0,dataIndex:"name"},{header:e.lmsg("context"),sortable:!0,dataIndex:"context"},{header:e.lmsg("sendToAdmin"),cls:"number t-r",renderer:t=>Object(n.createElement)(l,{settings:t})}]})]})}}}]);
//# sourceMappingURL=panel-notifications-settings.js.map?f0185306f0e9e906570f