/*! For license information please see TabPanels.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports["l3-style"]=t(require("react")):e["l3-style"]=t(e.react)}(this,(e=>(()=>{var t={94184:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},63482:(e,t,r)=>{"use strict";r.r(t)},42487:(e,t,r)=>{"use strict";r.r(t)},75251:(e,t,r)=>{"use strict";var n=r(8156),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,i={},l=null,c=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,n)&&!u.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:c,props:i,_owner:a.current}}t.jsx=l,t.jsxs=l},85893:(e,t,r)=>{"use strict";e.exports=r(75251)},6309:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(85893),u=i(r(8156)),l=a(r(94184)),c=a(r(98649)),f=r(27948);r(63482);const p=(0,u.forwardRef)((({className:e,id:t,activeTabId:r=0,animationDirection:n=f.TabPanelsAnimationDirection.RTL,children:o,renderOnlyActiveTab:i=!1},a)=>{const p=(0,u.useRef)(null),d=(0,c.default)({refs:[a,p]}),y=(0,u.useMemo)((()=>u.default.Children.map(o,((e,t)=>{const o=r===t;if(i&&!o)return null;const a=o?"active":"non-active",s=o?`animation-direction-${n}`:"";return u.default.cloneElement(e,Object.assign(Object.assign({index:t},e.props),{className:(0,l.default)("tab-panel",a,s,e.props.className)}))})).filter(Boolean)),[o,r,i,n]);return(0,s.jsx)("div",Object.assign({ref:d,className:(0,l.default)("tab-panels--wrapper",e),id:t},{children:y}))}));Object.assign(p,{isTabPanels:!0,animationDirections:f.TabPanelsAnimationDirection}),t.default=p},27948:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabPanelsAnimationDirection=void 0,function(e){e.RTL="rtl",e.LTR="ltr"}(t.TabPanelsAnimationDirection||(t.TabPanelsAnimationDirection={}))},98649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8156);t.default=function({refs:e=[]}){return(0,n.useMemo)((()=>e.every((e=>null===e))?null:t=>{e.forEach((e=>{e&&function(e,t){if(null===e)return;if("function"==typeof e)return void e(t);try{e.current=t}catch(r){throw console.error(r),new Error(`Cannot assign value '${t}' to ref '${e}'`)}}(e,t)}))}),[e])}},41921:(e,t,r)=>{"use strict";r(42487)},8156:t=>{"use strict";t.exports=e}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,n),i.exports}return n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(41921),n(6309)})()));
//# sourceMappingURL=TabPanels.js.map