Liferay.Loader.define("commerce-product-content-web@4.0.77/product_detail/render/js/Tabs",["module","exports","require","@frontend-taglib-clay$clayui/tabs","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function _default({hasCPDefinitionSpecificationOptionValues:t,hasCPMedia:a,hasDescription:l,hasReplacements:i,namespace:c,navCPMediaId:u,navDescriptionId:o,navReplacementsId:d,navSpecificationsId:f}){const[s,p]=(0,r.useState)(0),[m,g]=(0,r.useState)(!0),display=t=>{for(let a=0;a<e.length;a++){const n=e[a].id,r=document.getElementById(n);t===n?r.classList.add("active","show"):r.classList.remove("active","show"),m||n!==d||(r.style.display=null,r.style.visibility=null,r.style.height=null)}};return(0,r.useEffect)((()=>{e=document.getElementsByClassName(c+"tab-element"),l?(display(o),p(0)):t?(display(f),p(1)):a?(display(u),p(2)):i&&(display(d),p(3)),g(!1)}),[t,a,l,i,u,o,d,f,c]),r.default.createElement(r.default.Fragment,null,r.default.createElement(n.default,{className:"nav-left",modern:!0},l?r.default.createElement(n.default.Item,{active:0===s,innerProps:{"aria-controls":"tabpanel-1"},onClick:()=>{display(o),p(0)}},Liferay.Language.get("full-description")):r.default.createElement(r.default.Fragment,null),t?r.default.createElement(n.default.Item,{active:1===s,innerProps:{"aria-controls":"tabpanel-2"},onClick:()=>{display(f),p(1)}},Liferay.Language.get("specifications")):r.default.createElement(r.default.Fragment,null),a?r.default.createElement(n.default.Item,{active:2===s,innerProps:{"aria-controls":"tabpanel-3"},onClick:()=>{display(u),p(2)}},Liferay.Language.get("attachments")):r.default.createElement(r.default.Fragment,null),i?r.default.createElement(n.default.Item,{active:3===s,innerProps:{"aria-controls":"tabpanel-4"},onClick:()=>{display(d),p(3)}},Liferay.Language.get("replacements")):r.default.createElement(r.default.Fragment,null)))};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(a("@frontend-taglib-clay$clayui/tabs")),r=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={},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 _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}let e=[]}}));
//# sourceMappingURL=Tabs.js.map