Liferay.Loader.define("@liferay/content-dashboard-web@2.0.69/js/components/Sidebar",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/layout","@liferay/frontend-js-react-web","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SidebarContext=void 0;var n=a("@frontend-taglib-clay$clayui/button"),r=s(a("@frontend-taglib-clay$clayui/layout")),l=a("@liferay/frontend-js-react-web"),o=s(a("liferay!frontend-js-react-web$classnames")),c=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(a,r,l):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}const e=c.default.createContext();t.SidebarContext=e;const u=()=>{},f=({children:e,className:t})=>c.default.createElement("div",{className:(0,o.default)("sidebar-body",t)},e),b=({children:t,title:a})=>{const{onClose:l}=(0,c.useContext)(e);return c.default.createElement("section",{className:"sidebar-header"},c.default.createElement(r.default.ContentRow,{className:"sidebar-section"},c.default.createElement(r.default.ContentCol,{className:"justify-content-center",expand:!0},c.default.createElement("p",{className:"font-weight-bold mb-0 pr-2"},a)),t&&c.default.createElement(r.default.ContentCol,null,t),c.default.createElement(r.default.ContentCol,null,c.default.createElement(n.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("close"),className:"text-secondary","data-tooltip-align":"bottom",displayType:"unstyled",onClick:l,symbol:"times",title:Liferay.Language.get("close")}))))},y=({children:t,fetchData:a,onClose:n=u,open:r=!0})=>{const[o,d]=(0,c.useState)(!1),s=(0,l.useTimeout)();return(0,c.useEffect)((()=>{!1!==r?s((()=>d(!0)),100):d(!1)}),[s,r]),(0,c.useEffect)((()=>{o?document.body.classList.add("sidebar-open"):document.body.classList.remove("sidebar-open")}),[o]),c.default.createElement("div",{className:"cadmin"},c.default.createElement("div",{className:"content-dashboard sidebar sidebar-light sidebar-sm"},c.default.createElement(e.Provider,{value:{fetchData:a,onClose:n}},t)))};y.Body=f,y.Header=b;var i=y;t.default=i}}));
//# sourceMappingURL=Sidebar.js.map