Liferay.Loader.define("@liferay/template-web@1.0.51/js/ddm_template_editor/components/PropertiesSidebarPanel",["module","exports","require","@frontend-taglib-clay$clayui/loading-indicator","@liferay/frontend-js-react-web","liferay!frontend-js-react-web$classnames","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./AppContext"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function PropertiesSidebarPanel({className:e}){const[t,r]=(0,l.useState)(!0),[u,c]=(0,l.useState)(""),f=(0,a.useIsMounted)(),{propertiesViewURL:s}=(0,l.useContext)(d.AppContext);return(0,l.useEffect)((()=>{s&&(0,o.fetch)(s).then((e=>e.text())).then((e=>{f()&&(c(e),r(!1))})).catch((e=>{}))}),[f,s]),l.default.createElement("div",{className:(0,i.default)(e,"px-3")},l.default.createElement("h1",{className:"ddm_template_editor__App-sidebar-title mb-4 mt-3"},Liferay.Language.get("properties")),l.default.createElement("div",null,t?l.default.createElement(n.default,null):l.default.createElement(PropertiesSidebarPanelBody,{content:u})))};var n=_interopRequireDefault(r("@frontend-taglib-clay$clayui/loading-indicator")),a=r("@liferay/frontend-js-react-web"),i=_interopRequireDefault(r("liferay!frontend-js-react-web$classnames")),o=r("frontend-js-web"),l=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();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 i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),d=r("./AppContext");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class PropertiesSidebarPanelBody extends l.default.Component{constructor(e){super(e),this._ref=l.default.createRef()}componentDidMount(){this._ref.current&&((0,o.runScriptsInElement)(this._ref.current),this._ref.current.addEventListener("change",this._handleOnChange))}shouldComponentUpdate(){return!1}render(){return l.default.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.content},ref:this._ref})}}}}));
//# sourceMappingURL=PropertiesSidebarPanel.js.map