Liferay.Loader.define("data-engine-taglib@3.3.26/data_layout_builder/js/components/sidebar/Sidebar.es",["module","exports","require","./Sidebar.scss","@frontend-taglib-clay$clayui/layout","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../search-input/SearchInput.es"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.SidebarTabContent=a.SidebarTabs=a.SidebarTab=a.SidebarSearchInput=a.SidebarHeader=a.SidebarFooter=a.SidebarBody=void 0,t("./Sidebar.scss");var r=s(t("@frontend-taglib-clay$clayui/layout")),n=s(t("liferay!frontend-js-react-web$classnames")),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=c();if(a&&a.has(e))return a.get(e);var t={},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(t,n,l):t[n]=e[n]}t.default=e,a&&a.set(e,t);return t}(t("liferay!frontend-js-react-web$react")),d=s(t("../search-input/SearchInput.es"));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}const e=l.default.forwardRef((({children:e,className:a},t)=>l.default.createElement("div",{className:(0,n.default)(a,"data-layout-builder-sidebar"),ref:t},l.default.createElement("div",{className:"sidebar sidebar-light"},e)))),o=({children:e,className:a})=>l.default.createElement("div",{className:(0,n.default)(a,"sidebar-body")},e);a.SidebarBody=o;const u=({children:e})=>l.default.createElement("div",{className:"sidebar-footer"},e);a.SidebarFooter=u;const f=({children:e,className:a})=>l.default.createElement("div",{className:(0,n.default)(a,"sidebar-header")},e);a.SidebarHeader=f;const b=({children:e,onSearch:a,searchText:t})=>l.default.createElement(r.default.ContentRow,{className:"sidebar-section"},l.default.createElement(r.default.ContentCol,{expand:!0},a&&l.default.createElement(d.default,{onChange:e=>a(e),searchText:t})),e);a.SidebarSearchInput=b;const m=({initialSelectedTab:e=0,searchTerm:a,setKeywords:t=(()=>{}),tabs:r})=>{const[n,d]=(0,l.useState)(e);return l.default.createElement(l.default.Fragment,null,l.default.createElement(p,{onTabClick:e=>{d(e),t("")},selectedTab:n,tabs:r}),l.default.createElement(y,null,r[n].render({searchTerm:a})))};a.SidebarTabs=m;const p=({onTabClick:e,selectedTab:a,tabs:t})=>l.default.createElement("nav",{className:"component-tbar tbar"},l.default.createElement(r.default.ContainerFluid,null,l.default.createElement("ul",{className:"nav nav-underline",role:"tablist"},t.map((({label:t},r)=>l.default.createElement("li",{className:"nav-item",key:r},l.default.createElement("button",{className:(0,n.default)("btn btn-unstyled nav-link",{active:a===r}),"data-senna-off":!0,onClick:a=>{a.preventDefault(),e(r)},role:"tab"},t)))))));a.SidebarTab=p;const y=({children:e})=>l.default.createElement("div",{className:"tab-content"},l.default.createElement("div",{className:"active fade mt-3 show tab-pane",role:"tabpanel"},e));a.SidebarTabContent=y;const v=({className:e,title:a})=>l.default.createElement(r.default.ContentRow,{className:(0,n.default)("sidebar-section",e)},l.default.createElement(r.default.ContentCol,{expand:!0},l.default.createElement("div",{className:"component-title"},l.default.createElement("span",{className:"text-truncate-inline"},a))));e.Body=o,e.Footer=u,e.Header=f,e.SearchInput=b,e.Tab=p,e.Tabs=m,e.TabContent=y,e.Title=v;var i=e;a.default=i}}));
//# sourceMappingURL=Sidebar.es.js.map