import{s as g}from"./chunk-DZLz74EQ.js";import{t as L}from"./react-BcIddLXZ.js";import{n as P,t as S}from"./jsx-runtime-DvsdsEjx.js";import{t as h}from"./cn-C5VTNYKf.js";import{M as q,N as j,j as B}from"./dropdown-menu-1SGi7wHR.js";import{S as O,_ as G,b as y,h as p,u as H,v as J}from"./Combination-DR4iFoRS.js";import{u as Q}from"./menu-items-DOc2hwO2.js";var u=g(L(),1),d=g(S(),1),v="Tabs",[U,oe]=O(v,[j]),w=j(),[W,x]=U(v),C=u.forwardRef((n,o)=>{let{__scopeTabs:e,value:a,onValueChange:t,defaultValue:r,orientation:i="horizontal",dir:c,activationMode:m="automatic",...b}=n,l=Q(c),[s,f]=J({prop:a,onChange:t,defaultProp:r??"",caller:v});return(0,d.jsx)(W,{scope:e,baseId:H(),value:s,onValueChange:f,orientation:i,dir:l,activationMode:m,children:(0,d.jsx)(p.div,{dir:l,"data-orientation":i,...b,ref:o})})});C.displayName=v;var T="TabsList",_=u.forwardRef((n,o)=>{let{__scopeTabs:e,loop:a=!0,...t}=n,r=x(T,e),i=w(e);return(0,d.jsx)(q,{asChild:!0,...i,orientation:r.orientation,dir:r.dir,loop:a,children:(0,d.jsx)(p.div,{role:"tablist","aria-orientation":r.orientation,...t,ref:o})})});_.displayName=T;var R="TabsTrigger",M=u.forwardRef((n,o)=>{let{__scopeTabs:e,value:a,disabled:t=!1,...r}=n,i=x(R,e),c=w(e),m=V(i.baseId,a),b=k(i.baseId,a),l=a===i.value;return(0,d.jsx)(B,{asChild:!0,...c,focusable:!t,active:l,children:(0,d.jsx)(p.button,{type:"button",role:"tab","aria-selected":l,"aria-controls":b,"data-state":l?"active":"inactive","data-disabled":t?"":void 0,disabled:t,id:m,...r,ref:o,onMouseDown:y(n.onMouseDown,s=>{!t&&s.button===0&&s.ctrlKey===!1?i.onValueChange(a):s.preventDefault()}),onKeyDown:y(n.onKeyDown,s=>{[" ","Enter"].includes(s.key)&&i.onValueChange(a)}),onFocus:y(n.onFocus,()=>{let s=i.activationMode!=="manual";!l&&!t&&s&&i.onValueChange(a)})})})});M.displayName=R;var D="TabsContent",I=u.forwardRef((n,o)=>{let{__scopeTabs:e,value:a,forceMount:t,children:r,...i}=n,c=x(D,e),m=V(c.baseId,a),b=k(c.baseId,a),l=a===c.value,s=u.useRef(l);return u.useEffect(()=>{let f=requestAnimationFrame(()=>s.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,d.jsx)(G,{present:t||l,children:({present:f})=>(0,d.jsx)(p.div,{"data-state":l?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":m,hidden:!f,id:b,tabIndex:0,...i,ref:o,style:{...n.style,animationDuration:s.current?"0s":void 0},children:f&&r})})});I.displayName=D;function V(n,o){return`${n}-trigger-${o}`}function k(n,o){return`${n}-content-${o}`}var X=C,F=_,$=M,A=I,N=g(P(),1),Y=X,E=u.forwardRef((n,o)=>{let e=(0,N.c)(9),a,t;e[0]===n?(a=e[1],t=e[2]):({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t);let r;e[3]===a?r=e[4]:(r=h("inline-flex max-h-14 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",a),e[3]=a,e[4]=r);let i;return e[5]!==t||e[6]!==o||e[7]!==r?(i=(0,d.jsx)(F,{ref:o,className:r,...t}),e[5]=t,e[6]=o,e[7]=r,e[8]=i):i=e[8],i});E.displayName=F.displayName;var K=u.forwardRef((n,o)=>{let e=(0,N.c)(9),a,t;e[0]===n?(a=e[1],t=e[2]):({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t);let r;e[3]===a?r=e[4]:(r=h("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",a),e[3]=a,e[4]=r);let i;return e[5]!==t||e[6]!==o||e[7]!==r?(i=(0,d.jsx)($,{ref:o,className:r,...t}),e[5]=t,e[6]=o,e[7]=r,e[8]=i):i=e[8],i});K.displayName=$.displayName;var z=u.forwardRef((n,o)=>{let e=(0,N.c)(9),a,t;e[0]===n?(a=e[1],t=e[2]):({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t);let r;e[3]===a?r=e[4]:(r=h("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2",a),e[3]=a,e[4]=r);let i;return e[5]!==t||e[6]!==o||e[7]!==r?(i=(0,d.jsx)(A,{ref:o,className:r,...t}),e[5]=t,e[6]=o,e[7]=r,e[8]=i):i=e[8],i});z.displayName=A.displayName;export{K as i,z as n,E as r,Y as t};
