"use strict";(self.webpackChunk_cromwell_admin_panel=self.webpackChunk_cromwell_admin_panel||[]).push([[445],{33044:(e,n,t)=>{t.d(n,{Z:()=>i});var l=t(82609),a=t.n(l)()((function(e){return e[1]}));a.push([e.id,".PluginPage_c8mqg{width:100%;height:100%;padding:15px}",""]),a.locals={PluginPage:"PluginPage_c8mqg"};const i=a},76445:(e,n,t)=>{t.r(n),t.d(n,{default:()=>S});var l=t(49352),a=t(2784),i=t(46062),s=t.n(i),c=t(44036),o=t.n(c),r=t(96793),u=t.n(r),g=t(9978),d=t.n(g),m=t(11173),P=t.n(m),p=t(42464),v=t.n(p),h=t(33044),w={attributes:{"data-meta":"crw-admin-style"}};w.styleTagTransform=v(),w.setAttributes=d(),w.insert=u().bind(null,"head"),w.domAPI=o(),w.insertStyleElement=P(),s()(h.Z,w);const f=h.Z&&h.Z.locals?h.Z.locals:void 0,y={},_={},S=e=>{var n,t,i;const s=new URLSearchParams(null===(n=null==e?void 0:e.location)||void 0===n?void 0:n.search).get("pluginName"),c=(0,l.getRestApiClient)(),[o,r]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{const e=async()=>{var e;try{const n=(await(null===(e=(0,l.getRestApiClient)())||void 0===e?void 0:e.getPluginList())).find((e=>e.name===s));n&&(_[s]=n)}catch(e){console.error(e)}},n=async()=>{try{const e=await(null==c?void 0:c.getPluginSettings(s));e&&(y[s]=e)}catch(e){console.error(e)}};(async()=>{await Promise.all([e(),n()]),r(!0)})()}),[]),o?a.createElement("div",{className:f.PluginPage},a.createElement(l.AdminPanelWidgetPlace,{widgetName:"PluginSettings",pluginName:s,widgetProps:{pluginName:s,pluginSettings:null!==(t=y[s])&&void 0!==t?t:{},pluginInfo:null!==(i=_[s])&&void 0!==i?i:{}}})):a.createElement(l.LoadBox,null)}}}]);