import{f as F,r as l,h as $,j as c,P as g,i as p,k,d as T}from"./index-CdLZCFax.js";import{e as y,d as D,c as V,R as G,I as L}from"./index-Dr4C0uWC.js";var m="Tabs",[K,U]=F(m,[y]),h=y(),[B,x]=K(m),N=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,onValueChange:r,defaultValue:d,orientation:s="horizontal",dir:u,activationMode:b="automatic",...v}=e,i=D(u),[n,f]=$({prop:o,onChange:r,defaultProp:d??"",caller:m});return c.jsx(B,{scope:t,baseId:V(),value:n,onValueChange:f,orientation:s,dir:i,activationMode:b,children:c.jsx(g.div,{dir:i,"data-orientation":s,...v,ref:a})})});N.displayName=m;var C="TabsList",I=l.forwardRef((e,a)=>{const{__scopeTabs:t,loop:o=!0,...r}=e,d=x(C,t),s=h(t);return c.jsx(G,{asChild:!0,...s,orientation:d.orientation,dir:d.dir,loop:o,children:c.jsx(g.div,{role:"tablist","aria-orientation":d.orientation,...r,ref:a})})});I.displayName=C;var R="TabsTrigger",j=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,disabled:r=!1,...d}=e,s=x(R,t),u=h(t),b=A(s.baseId,o),v=E(s.baseId,o),i=o===s.value;return c.jsx(L,{asChild:!0,...u,focusable:!r,active:i,children:c.jsx(g.button,{type:"button",role:"tab","aria-selected":i,"aria-controls":v,"data-state":i?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:b,...d,ref:a,onMouseDown:p(e.onMouseDown,n=>{!r&&n.button===0&&n.ctrlKey===!1?s.onValueChange(o):n.preventDefault()}),onKeyDown:p(e.onKeyDown,n=>{[" ","Enter"].includes(n.key)&&s.onValueChange(o)}),onFocus:p(e.onFocus,()=>{const n=s.activationMode!=="manual";!i&&!r&&n&&s.onValueChange(o)})})})});j.displayName=R;var w="TabsContent",_=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,forceMount:r,children:d,...s}=e,u=x(w,t),b=A(u.baseId,o),v=E(u.baseId,o),i=o===u.value,n=l.useRef(i);return l.useEffect(()=>{const f=requestAnimationFrame(()=>n.current=!1);return()=>cancelAnimationFrame(f)},[]),c.jsx(k,{present:r||i,children:({present:f})=>c.jsx(g.div,{"data-state":i?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":b,hidden:!f,id:v,tabIndex:0,...s,ref:a,style:{...e.style,animationDuration:n.current?"0s":void 0},children:f&&d})})});_.displayName=w;function A(e,a){return`${e}-trigger-${a}`}function E(e,a){return`${e}-content-${a}`}var q=N,P=I,S=j,M=_;const W=q,z=l.forwardRef(({className:e,...a},t)=>c.jsx(P,{ref:t,className:T("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...a}));z.displayName=P.displayName;const H=l.forwardRef(({className:e,...a},t)=>c.jsx(S,{ref:t,className:T("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}));H.displayName=S.displayName;const O=l.forwardRef(({className:e,...a},t)=>c.jsx(M,{ref:t,className:T("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a}));O.displayName=M.displayName;export{W as T,z as a,H as b,O as c};
