Liferay.Loader.define("document-library-web@6.0.75/document_library/js/data-engine/panels/InfoPanel.es",["module","exports","require","@frontend-taglib-clay$clayui/loading-indicator","@liferay/frontend-js-react-web","frontend-js-web","liferay!frontend-js-react-web$react"],(function(e,t,r){var n;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({title:t,url:r}){const[n,u]=(0,c.useState)(!0),[d,f]=(0,c.useState)(""),i=(0,l.useIsMounted)();return(0,c.useEffect)((()=>{(0,o.fetch)(r).then((e=>e.text())).then((e=>{i()&&(f(e),u(!1))})).catch((e=>{}))}),[i,r]),c.default.createElement("div",{className:"sidebar-sm"},c.default.createElement("div",{className:"sidebar-header"},c.default.createElement("p",{className:"component-title h4"},t)),c.default.createElement("div",{className:"sidebar-body"},n?c.default.createElement(a.default,null):c.default.createElement(e,{content:d})))};var a=(n=r("@frontend-taglib-clay$clayui/loading-indicator"))&&n.__esModule?n:{default:n},l=r("@liferay/frontend-js-react-web"),o=r("frontend-js-web"),c=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var l=n?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}class e extends c.default.Component{constructor(e){super(e),this._ref=c.default.createRef()}componentDidMount(){this._ref.current&&((0,o.runScriptsInElement)(this._ref.current),this._ref.current.addEventListener("change",this._handleOnChange))}shouldComponentUpdate(){return!1}render(){return c.default.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.content},ref:this._ref})}}}}));
//# sourceMappingURL=InfoPanel.es.js.map