import{a as I,_ as A}from"./CEyI8lcf.js";import{d as F,k as H,r as x,E as w,h as M,G as k,R as N,s as V,c as n,a as c,w as f,f as _,o,e as i,b,u as a,L as h,_ as G,F as S,A as C,t as T,K,m as O,T as P,j as U}from"./m2W8DxR4.js";import{_ as q,a as J,b as Q,c as X}from"./UqrktGnl.js";import{_ as Y}from"./CUZc3WDI.js";import{f as Z,g as tt}from"./DaqkdMVO.js";import{j as et}from"./DN4yyKL7.js";import"./BZWJQvfz.js";import"./DT-hKSom.js";import"./b1l8QPBl.js";import"./C8GYBF0x.js";import"./f4OvDAmT.js";import"./COA9s1yS.js";import"./BNOTwGsJ.js";import"./ByXNX2C_.js";const ot={class:"flex flex-col gap-6"},rt={key:0,class:"flex w-full justify-center"},at={class:"relative container mx-auto flex justify-center px-4"},st={class:"pointer-events-none absolute inset-0 z-10"},nt={class:"text-center"},lt={class:"text-base leading-6 font-medium whitespace-nowrap"},ct={key:1,class:"container mx-auto flex justify-center px-4"},it={class:"dark-text-gradient mx-auto text-center text-[1.125rem] md:w-[712px]"},ut={key:1,class:"w-full text-center"},dt=F({__name:"HorizontalTabsWithContent",props:{tabsData:{},description:{type:Boolean,default:!1},centeredContent:{type:Boolean,default:!0}},setup(ft){const{locale:s}=H(),p=x(),m=x({top:!0,bottom:!0,left:!0,right:!0});let u=null;const{width:$}=tt(),v=()=>{if(u&&(u(),u=null),p.value){const t=g(p.value);if(t)try{const{arrivedState:e}=Z(t,{offset:{top:10,bottom:10,left:10,right:10}});u=w(e,d=>{m.value=d},{immediate:!0})}catch(e){console.warn("Failed to initialize tabs scroll watcher:",e)}}},z=et(()=>{v()},150);w($,()=>{k(()=>{z()})}),M(()=>{k(()=>{v()})}),N(()=>{u&&u()});const g=t=>t?typeof t=="object"&&"$el"in t&&t.$el instanceof HTMLElement?t.$el:t instanceof HTMLElement?t:null:null,L=V(()=>{const t=!m.value.left,e=!m.value.right;return s.value==="ar"?{"scroll-fade-left-rtl":t,"scroll-fade-right-rtl":e,"scroll-fade-both-horizontal-rtl":t&&e}:{"scroll-fade-left":t,"scroll-fade-right":e,"scroll-fade-both-horizontal":t&&e}}),y=t=>{if(!p.value)return;const e=g(p.value);if(!e||typeof e.scrollBy!="function"){console.warn("Invalid scroll element for tabs");return}const l=200;try{t==="left"?e.scrollBy({left:-l,behavior:"smooth"}):t==="right"&&e.scrollBy({left:l,behavior:"smooth"})}catch(d){console.warn("Failed to scroll tabs:",d)}};return(t,e)=>{const l=I,d=A,D=G,B=J,j=Q,E=X,R=q,W=Y;return t.tabsData&&t.tabsData.length>0?(o(),n(R,{key:0,orientation:"horizontal","default-value":t.tabsData[0].value,class:"w-full"},{default:f(()=>[i("div",ot,[t.tabsData.length>1?(o(),c("div",rt,[i("div",at,[_(D,null,{default:f(()=>[i("div",st,[a(m).left?b("",!0):(o(),c("div",{key:0,class:h(["bg-surface-background hover:bg-surface-background/90 border-surface-border pointer-events-auto absolute top-1/2 -translate-y-1/2 transform animate-pulse cursor-pointer rounded-full border p-2 shadow-lg backdrop-blur-sm transition-colors hover:shadow-xl",a(s)==="ar"?"right-2":"left-2"]),onClick:e[0]||(e[0]=r=>y(a(s)==="ar"?"right":"left"))},[a(s)!=="ar"?(o(),n(l,{key:0,class:"text-foreground"})):(o(),n(d,{key:1,class:"text-foreground"}))],2)),a(m).right?b("",!0):(o(),c("div",{key:1,class:h(["bg-surface-background hover:bg-surface-background/90 border-surface-border pointer-events-auto absolute top-1/2 -translate-y-1/2 transform animate-pulse cursor-pointer rounded-full border p-2 shadow-lg backdrop-blur-sm transition-colors hover:shadow-xl",a(s)==="ar"?"left-2":"right-2"]),onClick:e[1]||(e[1]=r=>y(a(s)==="ar"?"left":"right"))},[a(s)!=="ar"?(o(),n(d,{key:0,class:"text-foreground"})):(o(),n(l,{key:1,class:"text-foreground"}))],2))])]),_:1}),_(j,{ref_key:"tabsListRef",ref:p,dir:a(s)==="ar"?"rtl":"ltr",class:h(["rounded-ws-rounded ws-no-scrollbar tabs-gradient-border flex h-auto w-fit max-w-full flex-row justify-start gap-[4px] overflow-x-auto overflow-y-visible p-0",a(L)])},{default:f(()=>[(o(!0),c(S,null,C(t.tabsData,r=>(o(),n(B,{key:r.value,value:r.value,gradient:!0,class:"rounded-ws-rounded min-h-[48px] w-auto flex-shrink-0 flex-grow-0 cursor-pointer border-transparent bg-transparent px-10 transition-all duration-300"},{default:f(()=>[i("div",nt,[i("span",lt,T(r.title),1)])]),_:2},1032,["value"]))),128))]),_:1},8,["dir","class"])])])):b("",!0),t.description?(o(),c("div",ct,[i("p",it,T(t.$t("projectStages.description")),1)])):b("",!0),i("div",{class:h([t.centeredContent?"container mx-auto px-4":"","w-full"])},[(o(!0),c(S,null,C(t.tabsData,r=>(o(),n(E,{key:r.value,value:r.value,dir:a(s)==="ar"?"rtl":"ltr"},{default:f(()=>[_(P,{name:"tab-content",mode:"out-in",appear:""},{default:f(()=>[(o(),n(K(r.component),O({key:r.value},{ref_for:!0},r.props||{}),null,16))]),_:2},1024)]),_:2},1032,["value","dir"]))),128))],2)])]),_:1},8,["default-value"])):(o(),c("div",ut,[_(W,{size:"100%","custom-message":t.$t("emptyState")},null,8,["custom-message"])]))}}}),$t=U(dt,[["__scopeId","data-v-43e8a02c"]]);export{$t as default};
