Liferay.Loader.define("frontend-taglib-clay@12.0.6/management_toolbar/InfoPanelControl",["module","exports","require","@frontend-taglib-clay$clayui/button","liferay!frontend-js-react-web$classnames","frontend-js-components-web","liferay!frontend-js-react-web$react","./FeatureFlagContext"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n("@frontend-taglib-clay$clayui/button"),a=c(n("liferay!frontend-js-react-web$classnames")),o=n("frontend-js-components-web"),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")),l=c(n("./FeatureFlagContext"));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}var u=({infoPanelId:e,onInfoButtonClick:t,separator:n})=>{const{showDesignImprovements:f}=(0,i.useContext)(l.default),c=(0,i.useRef)();return(0,i.useEffect)((()=>{if(!e)return;const t=c.current;return t&&Liferay.SideNavigation.initialize(t,{container:"#".concat(e),position:"right",type:"relative",typeMobile:"fixed",width:"320px"}),()=>{Liferay.SideNavigation.destroy(t)}}),[c,e]),i.default.createElement(o.ManagementToolbar.Item,{className:f&&(0,a.default)("d-none d-md-flex",{"management-bar-separator-left":n})},i.default.createElement(r.ClayButtonWithIcon,{className:"nav-link nav-link-monospaced",displayType:"unstyled",id:e&&"".concat(e,"_trigger"),onClick:t,ref:c,symbol:"info-circle-open"}))};t.default=u}}));
//# sourceMappingURL=InfoPanelControl.js.map