import"./swiper-bundle-D10wXgdm.js";import{S as B}from"./swiper-core-BbUUCioi.js";import{d as C,r as f,l as h,ae as E,D as m,w as L,c as l,h as y,o as d,b as t,n as r,F as W,p as F,A as g}from"./app-DJb_CRLj.js";import{_ as I}from"./_plugin-vue_export-helper-DlAUqK2U.js";const M=["id"],T={class:"row"},V={class:"col-12 swiper-container"},$={class:"swiper-wrapper"},x=["href"],D=["src","alt"],N=C({__name:"SliderType1",props:{status:{},component_id:{},data:{}},setup(b){const n=b,u=f(typeof window<"u"?window.innerWidth:1024),p=()=>{u.value=window.innerWidth};h(()=>{p(),window.addEventListener("resize",p)}),E(()=>{window.removeEventListener("resize",p)});const k=m(()=>{const e=n.data.style;if(!e)return"400px";const s=e.desktop_height,i=e.mobile_height;return u.value<=768?`${i??120}px`:`${s??400}px`}),o=m(()=>{const e=u.value<=768;return n.data.slider.filter(s=>e?s.show_on_mobile??!0:s.show_on_desktop??!0)}),S=m(()=>n.data.slider.every(e=>e.show_on_desktop===void 0&&e.show_on_mobile===void 0)),v=f(!1);let c=null;const w=()=>{c&&c.destroy(!0,!0),c=new B(".swiper-main-slider-"+n.component_id,{slidesPerView:1,effect:"fade",loop:o.value.length>1,fadeEffect:{crossFade:!0},spaceBetween:10,autoplay:{delay:7e3},pagination:{el:".swiper-pagination",type:"bullets",clickable:!0},observer:!0,observeParents:!0,observeSlideChildren:!0,on:{init:()=>{v.value=!0}}})};return h(()=>{w()}),L(o,()=>{setTimeout(()=>w(),50)}),(e,s)=>{var i,_;return o.value.length>0||S.value?(d(),l("div",{key:0,id:"component-"+e.component_id,class:r({container:!0,readonly:e.status=="dev"}),style:g("margin-top:"+(((i=e.data.style)==null?void 0:i.margin.top)??0)+"px; margin-bottom:"+(((_=e.data.style)==null?void 0:_.margin.bottom)??20)+"px;")},[t("div",T,[t("div",V,[t("div",{class:r("swiper swiper-main-slider swiper-main-slider-"+n.component_id)},[t("div",$,[(d(!0),l(W,null,F(o.value,(a,z)=>(d(),l("div",{key:z,class:r({"swiper-slide":!0,readonly:e.status=="dev"})},[t("a",{href:a.link},null,8,x),t("div",{class:r({image:!0,"sk sk-super-dark":!v.value}),style:g({backgroundImage:`url(${a.src})`,height:k.value+" !important"})},null,6),t("img",{src:a.src,alt:a.alt,class:"d-none",loading:"lazy"},null,8,D)],2))),128)),o.value.length===0?(d(),l("div",{key:0,class:r({"swiper-slide":!0,readonly:e.status=="dev"})},s[0]||(s[0]=[t("div",{class:"image"},null,-1)]),2)):y("",!0)]),s[1]||(s[1]=t("div",{class:"swiper-pagination"},null,-1))],2)])])],14,M)):y("",!0)}}}),U=I(N,[["__scopeId","data-v-f845ecb1"]]);export{U as default};
