"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),s=require("react"),d=require("../../utils/cn/cn.cjs.js"),f=require("./Tabs.cjs.js"),r=require("../../src/components/Tabs/tabs.module.css");function h(i){const n=s.useRef(null),[o,l]=s.useState(!1),[a,u]=s.useState(!1),t=s.useCallback(()=>{const e=n.current;e&&(l(e.scrollLeft>10),u(e.scrollLeft+e.clientWidth<e.scrollWidth-10))},[]);return s.useEffect(()=>{const e=n.current;if(e)return t(),e.addEventListener("scroll",t),window.addEventListener("resize",t),()=>{e.removeEventListener("scroll",t),window.removeEventListener("resize",t)}},[t]),c.jsx("div",{className:d.cn(r.tabsWrapper,{[r.showFadeLeft]:o,[r.showFadeRight]:a}),children:c.jsx("div",{ref:n,className:r.tabsTape,children:c.jsx(f.Tabs,{...i})})})}exports.TabsWithFade=h;
