import{a as e,q as a,r as t,b as n,j as s,o as i,P as o,s as r,I as d,f as l,d as c}from"./ui-vendor-Dyu0xMC9.js";import{r as u}from"./react-vendor-BiKEbLqf.js";import{c as f}from"./index-D2mkZfe8.js";var b="Tabs",[m,v]=e(b,[a]),p=a(),[g,y]=m(b),x=u.forwardRef((e,a)=>{const{__scopeTabs:r,value:d,onValueChange:l,defaultValue:c,orientation:u="horizontal",dir:f,activationMode:m="automatic",...v}=e,p=t(f),[y,x]=n({prop:d,onChange:l,defaultProp:c??"",caller:b});return s.jsx(g,{scope:r,baseId:i(),value:y,onValueChange:x,orientation:u,dir:p,activationMode:m,children:s.jsx(o.div,{dir:p,"data-orientation":u,...v,ref:a})})});x.displayName=b;var h="TabsList",j=u.forwardRef((e,a)=>{const{__scopeTabs:t,loop:n=!0,...i}=e,d=y(h,t),l=p(t);return s.jsx(r,{asChild:!0,...l,orientation:d.orientation,dir:d.dir,loop:n,children:s.jsx(o.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:a})})});j.displayName=h;var N="TabsTrigger",w=u.forwardRef((e,a)=>{const{__scopeTabs:t,value:n,disabled:i=!1,...r}=e,c=y(N,t),u=p(t),f=R(c.baseId,n),b=_(c.baseId,n),m=n===c.value;return s.jsx(d,{asChild:!0,...u,focusable:!i,active:m,children:s.jsx(o.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":b,"data-state":m?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...r,ref:a,onMouseDown:l(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(n)}),onKeyDown:l(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(n)}),onFocus:l(e.onFocus,()=>{const e="manual"!==c.activationMode;m||i||!e||c.onValueChange(n)})})})});w.displayName=N;var T="TabsContent",C=u.forwardRef((e,a)=>{const{__scopeTabs:t,value:n,forceMount:i,children:r,...d}=e,l=y(T,t),f=R(l.baseId,n),b=_(l.baseId,n),m=n===l.value,v=u.useRef(m);return u.useEffect(()=>{const e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),s.jsx(c,{present:i||m,children:({present:t})=>s.jsx(o.div,{"data-state":m?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":f,hidden:!t,id:b,tabIndex:0,...d,ref:a,style:{...e.style,animationDuration:v.current?"0s":void 0},children:t&&r})})});function R(e,a){return`${e}-trigger-${a}`}function _(e,a){return`${e}-content-${a}`}C.displayName=T;var I=j,D=w,M=C;const V=x,k=u.forwardRef(({className:e,...a},t)=>s.jsx(I,{ref:t,className:f("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...a}));k.displayName=I.displayName;const F=u.forwardRef(({className:e,...a},t)=>s.jsx(D,{ref:t,className:f("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...a}));F.displayName=D.displayName;const $=u.forwardRef(({className:e,...a},t)=>s.jsx(M,{ref:t,className:f("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a}));$.displayName=M.displayName;export{V as T,k as a,F as b,$ as c};