Liferay.Loader.define("@liferay/template-web@1.0.51/js/ddm_template_editor/components/Sidebar",["module","exports","require","@frontend-taglib-clay$clayui/button","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./ElementsSidebarPanel","./PropertiesSidebarPanel","./panelIds"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function Sidebar({selectedSidebarPanelId:e,setSelectedSidebarPanelId:t}){return(0,l.useEffect)((()=>{const a=Liferay.SideNavigation.instance(document.querySelector(".product-menu-toggle"));if(a){e&&a.visible()&&a.hide();const r=a.on("openStart.lexicon.sidenav",(()=>t(null)));return()=>{r.removeListener()}}}),[e,t]),l.default.createElement("div",{className:"ddm_template_editor__App-sidebar"},l.default.createElement("div",{className:(0,n.default)("ddm_template_editor__App-sidebar-content",{open:e})},l.default.createElement(i.ElementsSidebarPanel,{className:(0,n.default)({"d-none":d.PANEL_IDS.elements!==e})}),l.default.createElement(o.default,{className:(0,n.default)({"d-none":d.PANEL_IDS.properties!==e})})),l.default.createElement("div",{className:"ddm_template_editor__App-sidebar-buttons pt-3"},l.default.createElement(r.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("elements"),"aria-pressed":d.PANEL_IDS.elements===e,borderless:!0,className:(0,n.default)("mb-2",{active:d.PANEL_IDS.elements===e}),"data-tooltip-align":"left",displayType:"secondary",monospaced:!0,onClick:()=>{t((e=>e===d.PANEL_IDS.elements?null:d.PANEL_IDS.elements))},outline:!0,symbol:"list-ul",title:Liferay.Language.get("elements")}),l.default.createElement(r.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("properties"),"aria-pressed":d.PANEL_IDS.properties===e,borderless:!0,className:(0,n.default)("mb-2",{active:d.PANEL_IDS.properties===e}),"data-tooltip-align":"left",displayType:"secondary",monospaced:!0,onClick:()=>{t((e=>e===d.PANEL_IDS.properties?null:d.PANEL_IDS.properties))},outline:!0,symbol:"cog",title:Liferay.Language.get("properties")})))};var r=a("@frontend-taglib-clay$clayui/button"),n=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),l=(_interopRequireDefault(a("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 a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=r?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(a,n,l):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"))),i=a("./ElementsSidebarPanel"),o=_interopRequireDefault(a("./PropertiesSidebarPanel")),d=a("./panelIds");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}}}}));
//# sourceMappingURL=Sidebar.js.map