import{d as k,r as p,k as y,s as C,a as r,b as j,e as l,f as t,w as S,u as n,F as _,A as m,_ as $,o,X as A,L as B,j as V}from"./m2W8DxR4.js";import{a as L,_ as I}from"./CioX7pik.js";import{u as F}from"./ByNB5mo6.js";const N={class:"relative"},O={key:0,class:"min-h-[1696.380px] md:min-h-[558.5px] 2xl:min-h-[682.234px]"},R=["dir"],E={class:"bg-surface-background border-surface-border mx-auto flex w-full flex-col gap-4 rounded-[2rem] border p-4 lg:flex-row xl:max-w-[1190px]"},G={class:"flex flex-1 flex-col gap-y-4"},P={class:"relative aspect-[16/9] overflow-hidden rounded-2xl"},T={class:"flex flex-col gap-4 md:flex-row"},z={class:"relative aspect-[16/9] w-full overflow-hidden rounded-2xl"},M={class:"relative aspect-[16/9] w-full overflow-hidden rounded-2xl lg:[aspect-ratio:auto] lg:h-full"},W={class:"relative aspect-[8/9] w-full overflow-hidden rounded-2xl lg:shrink-0 lg:basis-1/3"},X={class:"mt-6 flex items-center justify-center gap-6"},q=["aria-label"],D={class:"custom-pagination-container"},H=["onClick"],J=["aria-label"],K=k({__name:"SocialSliderWithControls",props:{posts:{},isPending:{type:Boolean}},setup(Q){const d=p(null),u=p(0),{locale:b}=y(),f=C(()=>b.value==="ar"?"rtl":"ltr"),i=F(d,{slidesPerView:1,spaceBetween:20,autoplay:{delay:4e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},keyboard:{enabled:!0},loop:!0,centeredSlides:!1,grabCursor:!0,effect:"slide",speed:600,on:{slideChange:s=>{u.value=s.realIndex}}}),g=s=>{i.instance.value&&i.instance.value.slideToLoop(s)};return(s,c)=>{const a=A,w=$,v=L,x=I;return o(),r("div",N,[s.posts.length>0?(o(),r("div",O,[t(w,null,{default:S(()=>[(o(),r("swiper-container",{ref_key:"swiperRef",ref:d,key:n(f),dir:n(f),init:!1},[(o(!0),r(_,null,m(s.posts,e=>(o(),r("swiper-slide",{key:e.id},[l("div",E,[l("div",G,[l("div",P,[t(a,{src:e.image1,alt:"","aria-hidden":"true",width:1280,height:760,preset:"default",class:"absolute inset-0 h-full w-full scale-105 object-cover opacity-40 blur-md"},null,8,["src"]),t(a,{src:e.image1,alt:e.imageAlt1,width:1280,height:760,preset:"default",class:"absolute inset-0 h-full w-full object-contain"},null,8,["src","alt"])]),l("div",T,[l("div",z,[t(a,{src:e.image2,alt:"","aria-hidden":"true",width:1280,height:760,preset:"default",class:"absolute inset-0 h-full w-full scale-105 object-cover opacity-40 blur-md"},null,8,["src"]),t(a,{src:e.image2,alt:e.imageAlt2,width:1280,height:760,preset:"default",class:"absolute inset-0 h-full w-full object-contain"},null,8,["src","alt"])]),l("div",M,[t(a,{src:e.image3,alt:"","aria-hidden":"true",width:1280,height:760,preset:"default",class:"absolute inset-0 h-full w-full scale-105 object-cover opacity-40 blur-md"},null,8,["src"]),t(a,{src:e.image3,alt:e.imageAlt3,width:1280,height:760,preset:"default",class:"absolute inset-0 h-full w-full object-contain"},null,8,["src","alt"])])])]),l("div",W,[t(a,{src:e.imageVertical,alt:"","aria-hidden":"true",width:720,height:1280,preset:"default",class:"absolute inset-0 h-full w-full scale-105 object-cover opacity-40 blur-md"},null,8,["src"]),t(a,{src:e.imageVertical,alt:e.imageVerticalAlt,width:720,height:1280,preset:"default",class:"absolute inset-0 h-full w-full object-contain"},null,8,["src","alt"])])])]))),128))],8,R))]),_:1})])):j("",!0),l("div",X,[l("button",{"aria-label":s.$t("ariaLabels.prevBtn"),class:"prev-button-latest-models bg-surface-background border-surface-border rounded-ws-rounded flex-shrink-0 cursor-pointer border p-3",onClick:c[0]||(c[0]=e=>n(i).prev())},[t(v,{class:"ltr:scale-x-[-1] rtl:scale-x-[1]"})],8,q),l("div",D,[(o(!0),r(_,null,m(s.posts,(e,h)=>(o(),r("div",{key:`pagination-${e.id}`,class:B(["pagination-dot",{active:n(u)===h}]),onClick:U=>g(h)},null,10,H))),128))]),l("button",{"aria-label":s.$t("ariaLabels.nextBtn"),class:"next-button-latest-models bg-surface-background border-surface-border rounded-ws-rounded flex-shrink-0 cursor-pointer border p-3",onClick:c[1]||(c[1]=e=>n(i).next())},[t(x,{class:"ltr:scale-x-[-1] rtl:scale-x-[1]"})],8,J)])])}}}),le=V(K,[["__scopeId","data-v-153f4a3e"]]);export{le as default};
