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