Liferay.Loader.define("product-navigation-control-menu@6.0.52/js/TabsPanel",["module","exports","require","@frontend-taglib-clay$clayui/tabs","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./AddPanel","./TabsContent"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(a("@frontend-taglib-clay$clayui/tabs")),r=(c(a("liferay!frontend-js-react-web$prop-types")),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"))),l=a("./AddPanel"),o=c(a("./TabsContent"));function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}var f=({tabs:e})=>{const{portletNamespace:t}=(0,r.useContext)(l.AddPanelContext),[a,d]=(0,r.useState)(0),c=e=>"".concat(t,"_tab_").concat(e),f=e=>"".concat(t,"_tabPanel_").concat(e);return r.default.createElement(r.default.Fragment,null,r.default.createElement(n.default,{className:"sidebar-body__add-panel__tabs"},e.map(((e,t)=>r.default.createElement(n.default.Item,{active:a===t,innerProps:{"aria-controls":f(t),id:c(t)},key:t,onClick:()=>d(t)},e.label)))),r.default.createElement(n.default.Content,{activeIndex:a,className:"sidebar-body__add-panel__tab-content",fade:!0},e.map(((e,t)=>r.default.createElement(n.default.TabPane,{"aria-labelledby":c(t),id:f(t),key:t},r.default.createElement(o.default,{tab:e,tabIndex:t}))))))};t.default=f}}));
//# sourceMappingURL=TabsPanel.js.map