"use strict";const E=require("react/jsx-runtime"),n=require("react"),l=require("../tools/tools.cjs"),N=function(b){const{active:e=!1,as:T="div",className:u,dropOldClass:f,fade:a=!0,style:v,variables:m,...p}=b,[r,t]=n.useState(!1),[d,o]=n.useState(!1),y=n.useRef(null),q=n.useMemo(()=>{const s=l.classx(!f&&"tab-pane",a&&"fade",r&&"active",d&&"show",u),i=l.stylex((c,x)=>({tKey:l.convertBsKeyToVar(x)}),m,v);return{className:s,style:i}},[r,u,f,a,d,v,m]);return n.useEffect(()=>{if(!a){t(e),o(e);return}if(e){if(!r){t(!0);return}const s=y.current;if(!s)return;const i=()=>{e?o(!0):t(!1)};s.addEventListener("transitionend",i),t(!0);const c=requestAnimationFrame(()=>{o(!0)});return()=>{s.removeEventListener("transitionend",i),c&&cancelAnimationFrame(c)}}else o(!1),t(!1)},[r,e,a]),E.jsx(T,{...p,...q,ref:y})};N.displayName="BRL.NavTabPane";exports.NavTabPane=N;
//# sourceMappingURL=nav-tab-pane.cjs.map
