"use strict";(self.webpackChunk_digicms_admin=self.webpackChunk_digicms_admin||[]).push([[3677],{15415:function(T,d,e){e.r(d),e.d(d,{default:function(){return B}});var t=e(32735),l=e(58521),r=e(99357),o=e(5636),c=e(83983),m=e(94638),a=e(96709),s=e(28356),E=e(17e3),f=e(27649),u=e(49372),y=e(94745),C=e(76330),P=e(29005),g=e(66735),L=e(3594),I=e(84968),N=e(17247);const A=async()=>{const{data:n}=await N.be.get("/admin/plugins");return n};var D=n=>{const i=(0,l.useNotification)();return(0,I.useQuery)("list-enabled-plugins",()=>A(),{onSuccess(){n&&n()},onError(){i({type:"warning",message:{id:"notification.error",defaultMessage:"An error occured"}})}})},x=()=>{const{formatMessage:n}=(0,o.useIntl)(),{notifyStatus:i}=(0,m.G)();(0,l.useFocusWhenNavigate)();const h=n({id:"global.plugins",defaultMessage:"Plugins"}),O=()=>{i(n({id:"app.utils.notify.data-loaded",defaultMessage:"The {target} has loaded"},{target:h}))},{status:p,data:M}=D(O);return p!=="success"&&p!=="error"?t.createElement(a.A,null,t.createElement(f.o,{"aria-busy":!0},t.createElement(l.LoadingIndicatorPage,null))):t.createElement(a.A,null,t.createElement(f.o,null,t.createElement(s.T,{title:h,subtitle:n({id:"app.components.ListPluginsPage.description",defaultMessage:"List of the installed plugins in the project."})}),t.createElement(E.D,null,t.createElement(y.i,{colCount:2,rowCount:M?.plugins?.length??0+1},t.createElement(C.h,null,t.createElement(P.Tr,null,t.createElement(g.Th,null,t.createElement(u.Z,{variant:"sigma",textColor:"neutral600"},n({id:"global.name",defaultMessage:"Name"}))),t.createElement(g.Th,null,t.createElement(u.Z,{variant:"sigma",textColor:"neutral600"},n({id:"global.description",defaultMessage:"description"}))))),t.createElement(L.p,null,M.plugins.map(({name:v,displayName:W,description:R})=>t.createElement(P.Tr,{key:v},t.createElement(g.Td,null,t.createElement(u.Z,{textColor:"neutral800",variant:"omega",fontWeight:"bold"},n({id:`global.plugins.${v}`,defaultMessage:W}))),t.createElement(g.Td,null,t.createElement(u.Z,{textColor:"neutral800"},n({id:`global.plugins.${v}.description`,defaultMessage:R}))))))))))},B=()=>{const{formatMessage:n}=(0,o.useIntl)(),i=n({id:"global.plugins",defaultMessage:"Plugins"});return t.createElement(l.CheckPagePermissions,{permissions:c.Z.marketplace.main},t.createElement(r.Helmet,{title:i}),t.createElement(x,null))}},96709:function(T,d,e){e.d(d,{A:function(){return a}});var t=e(32735),l=e(60216),r=e(83292),o=e(72850);const c=(0,r.default)(o.x)`
  display: grid;
  grid-template-columns: ${({hasSideNav:s})=>s?"auto 1fr":"1fr"};
`,m=(0,r.default)(o.x)`
  overflow-x: hidden;
`,a=({sideNav:s,children:E})=>t.createElement(c,{hasSideNav:Boolean(s)},s,t.createElement(m,{paddingBottom:10},E));a.defaultProps={sideNav:void 0},a.propTypes={children:l.node.isRequired,sideNav:l.node}}}]);
