import{r as d,_ as F,V as $,j as c,O as p,a8 as k,$ as D,a1 as G,X as m,Q as L,Z as K,a0 as y,w as T,G as h}from"./index-C-gKvEDq.js";var g="Tabs",[B]=K(g,[y]),N=y(),[O,x]=B(g),C=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:r,defaultValue:l,orientation:s="horizontal",dir:u,activationMode:v="automatic",...f}=e,i=F(u),[o,b]=$({prop:a,onChange:r,defaultProp:l??"",caller:g});return c.jsx(O,{scope:n,baseId:k(),value:o,onValueChange:b,orientation:s,dir:i,activationMode:v,children:c.jsx(p.div,{dir:i,"data-orientation":s,...f,ref:t})})});C.displayName=g;var I="TabsList",R=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...r}=e,l=x(I,n),s=N(n);return c.jsx(D,{asChild:!0,...s,orientation:l.orientation,dir:l.dir,loop:a,children:c.jsx(p.div,{role:"tablist","aria-orientation":l.orientation,...r,ref:t})})});R.displayName=I;var j="TabsTrigger",w=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:r=!1,...l}=e,s=x(j,n),u=N(n),v=V(s.baseId,a),f=E(s.baseId,a),i=a===s.value;return c.jsx(G,{asChild:!0,...u,focusable:!r,active:i,children:c.jsx(p.button,{type:"button",role:"tab","aria-selected":i,"aria-controls":f,"data-state":i?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:v,...l,ref:t,onMouseDown:m(e.onMouseDown,o=>{!r&&o.button===0&&o.ctrlKey===!1?s.onValueChange(a):o.preventDefault()}),onKeyDown:m(e.onKeyDown,o=>{[" ","Enter"].includes(o.key)&&s.onValueChange(a)}),onFocus:m(e.onFocus,()=>{const o=s.activationMode!=="manual";!i&&!r&&o&&s.onValueChange(a)})})})});w.displayName=j;var _="TabsContent",A=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:r,children:l,...s}=e,u=x(_,n),v=V(u.baseId,a),f=E(u.baseId,a),i=a===u.value,o=d.useRef(i);return d.useEffect(()=>{const b=requestAnimationFrame(()=>o.current=!1);return()=>cancelAnimationFrame(b)},[]),c.jsx(L,{present:r||i,children:({present:b})=>c.jsx(p.div,{"data-state":i?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":v,hidden:!b,id:f,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:o.current?"0s":void 0},children:b&&l})})});A.displayName=_;function V(e,t){return`${e}-trigger-${t}`}function E(e,t){return`${e}-content-${t}`}var q=C,M=R,P=w,S=A;const U=q,z=h("inline-flex items-center justify-center",{variants:{variant:{pills:"h-auto gap-2 bg-transparent p-0",underlined:"h-auto gap-0 bg-neutral-100 dark:bg-neutral-700 p-0"}},defaultVariants:{variant:"pills"}}),H=d.forwardRef(({className:e,variant:t,...n},a)=>c.jsx(M,{ref:a,className:T(z({variant:t}),e),...n}));H.displayName=M.displayName;const Q=h("inline-flex items-center justify-center whitespace-nowrap text-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{pills:"rounded-full px-5 py-2.5 font-medium bg-transparent data-[state=active]:bg-primary-500 data-[state=active]:text-white data-[state=active]:font-semibold",underlined:"rounded-none px-5 py-3.5 font-medium bg-background dark:bg-card border-b-3 border-transparent data-[state=active]:border-primary-500 data-[state=active]:font-semibold"}},defaultVariants:{variant:"pills"}}),X=d.forwardRef(({className:e,variant:t,...n},a)=>c.jsx(P,{ref:a,className:T(Q({variant:t}),e),...n}));X.displayName=P.displayName;const Z=d.forwardRef(({className:e,...t},n)=>c.jsx(S,{ref:n,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),...t}));Z.displayName=S.displayName;export{U as T,H as a,X as b,Z as c};
