import{r as d,e3 as M,dT as F,dw as u,dU as v,e7 as G,e8 as L,e9 as $,dV as p,dZ as O,dY as k,ea as N,j as x,d1 as T}from"./index-Ef5HIHwv.js";var g="Tabs",[U]=k(g,[N]),h=N(),[Y,y]=U(g),S=d.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,onValueChange:r,defaultValue:c,orientation:n="horizontal",dir:l,activationMode:f="automatic",...m}=e,i=M(l),[s,b]=F({prop:o,onChange:r,defaultProp:c??"",caller:g});return u.jsx(Y,{scope:t,baseId:G(),value:s,onValueChange:b,orientation:n,dir:i,activationMode:f,children:u.jsx(v.div,{dir:i,"data-orientation":n,...m,ref:a})})});S.displayName=g;var C="TabsList",E=d.forwardRef((e,a)=>{const{__scopeTabs:t,loop:o=!0,...r}=e,c=y(C,t),n=h(t);return u.jsx(L,{asChild:!0,...n,orientation:c.orientation,dir:c.dir,loop:o,children:u.jsx(v.div,{role:"tablist","aria-orientation":c.orientation,...r,ref:a})})});E.displayName=C;var D="TabsTrigger",R=d.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,disabled:r=!1,...c}=e,n=y(D,t),l=h(t),f=w(n.baseId,o),m=A(n.baseId,o),i=o===n.value;return u.jsx($,{asChild:!0,...l,focusable:!r,active:i,children:u.jsx(v.button,{type:"button",role:"tab","aria-selected":i,"aria-controls":m,"data-state":i?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:f,...c,ref:a,onMouseDown:p(e.onMouseDown,s=>{!r&&s.button===0&&s.ctrlKey===!1?n.onValueChange(o):s.preventDefault()}),onKeyDown:p(e.onKeyDown,s=>{[" ","Enter"].includes(s.key)&&n.onValueChange(o)}),onFocus:p(e.onFocus,()=>{const s=n.activationMode!=="manual";!i&&!r&&s&&n.onValueChange(o)})})})});R.displayName=D;var j="TabsContent",I=d.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,forceMount:r,children:c,...n}=e,l=y(j,t),f=w(l.baseId,o),m=A(l.baseId,o),i=o===l.value,s=d.useRef(i);return d.useEffect(()=>{const b=requestAnimationFrame(()=>s.current=!1);return()=>cancelAnimationFrame(b)},[]),u.jsx(O,{present:r||i,children:({present:b})=>u.jsx(v.div,{"data-state":i?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:m,tabIndex:0,...n,ref:a,style:{...e.style,animationDuration:s.current?"0s":void 0},children:b&&c})})});I.displayName=j;function w(e,a){return`${e}-trigger-${a}`}function A(e,a){return`${e}-content-${a}`}var K=S,P=E,_=R,V=I;const Z=K,B=d.forwardRef(({className:e,...a},t)=>x.jsxDEV(P,{ref:t,className:T("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...a},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/ui/tabs.tsx",lineNumber:12,columnNumber:3},void 0));B.displayName=P.displayName;const q=d.forwardRef(({className:e,...a},t)=>x.jsxDEV(_,{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 focus-visible:outline-none focus-visible:ring-2 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",e),...a},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/ui/tabs.tsx",lineNumber:27,columnNumber:3},void 0));q.displayName=_.displayName;const z=d.forwardRef(({className:e,...a},t)=>x.jsxDEV(V,{ref:t,className:T("mt-2 data-[state=inactive]:hidden ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/ui/tabs.tsx",lineNumber:42,columnNumber:3},void 0));z.displayName=V.displayName;export{Z as T,B as a,q as b,z as c};
