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