import{d as E,r as g,s as F,h as j,R as G,an as N,a as p,e as t,f as _,w as C,ad as D,u as r,L as m,F as P,A as $,o as u,D as O,t as y,_ as R,c as U,b as q,g as H,j as J}from"./m2W8DxR4.js";import{_ as K}from"./ByXNX2C_.js";import{a as Q,_ as W}from"./CioX7pik.js";import{s as X}from"./x_rD_Ya3.js";const Y=H(K),Z={class:"relative isolate ml-4 min-h-[354px] w-full max-w-[1044px] md:ml-8"},ee={class:"relative h-full w-full pb-2 sm:pr-8 sm:pb-8"},te={class:"bg-surface-background border-surface-border min-h-[322px] w-full rounded-[24px] border p-6"},ae={class:"relative grid grid-cols-1 overflow-hidden md:grid-cols-6"},se={class:"col-span-6"},oe={class:"dark-text-gradient text-[66px] font-bold"},le={class:"dark-text-gradient text-[18px] font-semibold sm:text-[30px] lg:text-[32px]"},ne={class:"ws-scrollbar mt-6 max-h-[100px] overflow-auto pe-3 text-[16px] md:text-[18px]"},re={class:"absolute end-0 top-0 col-span-1 my-auto ms-auto"},ie={class:"lottie-container h-[100px] w-[100px] md:h-[150px] md:w-[150px]"},ue={class:"mt-6 flex items-center justify-center gap-6"},ce=["aria-label","disabled"],de={class:"custom-pagination-container"},pe=["onClick"],_e=["aria-label","disabled"],me=E({__name:"VerticalStackedCardsCarousel",props:{slides:{default:()=>[]},autoPlay:{type:Boolean,default:!1},autoPlayInterval:{default:3e3}},setup(S,{expose:L}){const s=S,o=g(0),c=g(null),e=g(!1),I=F(()=>{const a=s.slides.length,l=[];for(let d=0;d<3;d++){const b=(o.value+d)%a;l.push(s.slides[b])}return l}),A=a=>{const l="transition-all duration-700 ease-in-out";switch(a){case 0:return`${l} top-0 left-0 z-20`;case 1:return`${l} top-2 right-2 sm:top-4 sm:right-4 z-10`;case 2:return`${l} top-4 right-4 sm:top-8 sm:right-8 z-0`;default:return`${l} opacity-0`}},f=()=>{e.value||(e.value=!0,o.value=(o.value+1)%s.slides.length,v(),setTimeout(()=>{e.value=!1},750))},w=()=>{e.value||(e.value=!0,o.value=o.value===0?s.slides.length-1:o.value-1,v(),setTimeout(()=>{e.value=!1},750))},k=a=>{a===o.value||e.value||(e.value=!0,o.value=a,v(),setTimeout(()=>{e.value=!1},750))},v=()=>{s.autoPlay&&(x(),h())},h=()=>{s.autoPlay&&!c.value&&(c.value=X(()=>{e.value||f()},s.autoPlayInterval))},x=()=>{c.value&&(clearInterval(c.value),c.value=null)};j(()=>{s.autoPlay&&h()}),G(()=>{x()});const B=()=>{s.autoPlay&&x()},T=()=>{s.autoPlay&&h()},M=a=>{console.warn("Lottie animation error:",a.message)};return L({nextSlide:f,previousSlide:w,goToSlide:k,currentIndex:N(o)}),(a,l)=>{const d=Y,b=R,V=Q,z=W;return u(),p("div",{class:"flex flex-col items-center justify-center px-4",onMouseenter:B,onMouseleave:T},[t("div",Z,[t("div",ee,[_(D,{name:"stack",tag:"ul",class:"relative h-full w-full"},{default:C(()=>[(u(!0),p(P,null,$(r(I),(n,i)=>(u(),p("li",{key:n.id,class:m([A(i),"absolute w-full transition-all duration-700 ease-in-out"])},[t("div",te,[O(a.$slots,"default",{slide:n,index:i},()=>[t("div",ae,[t("div",se,[t("span",oe,y(`.0${(r(o)+i)%s.slides.length+1}`),1),t("div",null,[t("h3",le,y(n.title),1)]),t("p",ne,y(n.description),1)]),t("div",re,[t("div",ie,[_(b,null,{default:C(()=>[n.image?(u(),U(d,{key:0,name:n.image,height:"100",width:"100",onError:M},null,8,["name"])):q("",!0)]),_:2},1024)])])])],!0)])],2))),128))]),_:3})])]),t("div",ue,[t("button",{"aria-label":a.$t("ariaLabels.prevBtn"),class:m(["prev-button-latest-models bg-surface-background border-surface-border rounded-ws-rounded flex-shrink-0 cursor-pointer border p-3",{"cursor-not-allowed opacity-50":r(e)}]),disabled:r(e),onClick:w},[_(V,{class:"ltr:scale-x-[-1] rtl:scale-x-[1]"})],10,ce),t("div",de,[(u(!0),p(P,null,$(a.slides,(n,i)=>(u(),p("div",{key:`pagination-${n.id}`,class:m(["pagination-dot",{active:r(o)===i,"cursor-not-allowed opacity-50":r(e)}]),onClick:fe=>k(i)},null,10,pe))),128))]),t("button",{"aria-label":a.$t("ariaLabels.nextBtn"),class:m(["next-button-latest-models bg-surface-background border-surface-border rounded-ws-rounded flex-shrink-0 cursor-pointer border p-3",{"cursor-not-allowed opacity-50":r(e)}]),disabled:r(e),onClick:f},[_(z,{class:"ltr:scale-x-[-1] rtl:scale-x-[1]"})],10,_e)])],32)}}}),ge=J(me,[["__scopeId","data-v-20f9cabd"]]);export{ge as default};
