import{r as l,j as c}from"./index-gX9iSPDQ.js";import{k as F,u as $,b as k,d as D,P as g,e as m,a as p}from"./createLucideIcon-W0Ra_zwb.js";import{c as y,R as V,I as G,P as L}from"./index-DVAmEPTK.js";var T="Tabs",[K,W]=k(T,[y]),h=y(),[B,x]=K(T),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=F(u),[n,f]=$({prop:o,onChange:r,defaultProp:d});return c.jsx(B,{scope:t,baseId:D(),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=T;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(V,{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=P(s.baseId,o),i=o===s.value;return c.jsx(G,{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:m(e.onMouseDown,n=>{!r&&n.button===0&&n.ctrlKey===!1?s.onValueChange(o):n.preventDefault()}),onKeyDown:m(e.onKeyDown,n=>{[" ","Enter"].includes(n.key)&&s.onValueChange(o)}),onFocus:m(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=P(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(L,{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 P(e,a){return`${e}-content-${a}`}var q=N,E=I,S=j,M=_;const X=q,z=l.forwardRef(({className:e,...a},t)=>c.jsx(E,{ref:t,className:p("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",e),...a}));z.displayName=E.displayName;const H=l.forwardRef(({className:e,...a},t)=>c.jsx(S,{ref:t,className:p("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",e),...a}));H.displayName=S.displayName;const O=l.forwardRef(({className:e,...a},t)=>c.jsx(M,{ref:t,className:p("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...a}));O.displayName=M.displayName;export{X as T,z as a,H as b,O as c};
