import{Y as F,r as v,y as N,f as w,m as i,j as s,p as e,k as o,A as k,l as b,w as c,F as C,B as $,_ as U,C as h,i as B}from"./BCLrUOBx.js";import V from"./-hq_PDZF.js";import{u as j}from"./ChGwzFWX.js";const z={class:"main-slider"},E={key:0,class:"h-100"},T={class:"left flow-hidden"},A={class:"pos-rel"},Y=["onClick"],q={class:"slider-content-inner"},D=["id","alt","data-src"],G=["alt","src"],J={key:0,class:"right"},K=["src","alt"],M=["src","alt"],P={key:1,class:"shimmer-wrapper"},x={__name:"HomeHero",props:{slider:{type:Object,default(){return null}}},setup(I){const H=I,{slider:n}=F(H),y=v(0),_=v(!1),g=v(null);function L(t){g.value&&g.value.onThumbClick(t)}const{onChange:O,onFirstImageLoad:R}=j(y,_),{getImageURL:d,sourceUrl:p}=N(),a=w(()=>{var t;return(t=n.value)==null?void 0:t.right_bottom}),r=w(()=>{var t;return(t=n.value)==null?void 0:t.right_top});return(t,m)=>{const f=U,S=V;return s(),i("div",z,[e(n)&&e(n).main.length?(s(),i("div",E,[o("div",{class:h(["slider-wrapper",{"has-right":e(r)||e(a)}])},[o("div",T,[o("div",A,[b(S,{ref_key:"homeHeroRef",ref:g,class:h(["opacity-0",{"img-loading":e(_)}]),"image-count":e(n).main.length,bullets:!0,autoplay:6e3,loop:!0,addInitEvt:!0,lazy:!0,onOnChange:e(O),onOnInit:m[0]||(m[0]=u=>e(R)())},{"bullet-area":c(()=>[(s(!0),i(C,null,$(e(n).main,(u,l)=>(s(),i("span",{key:l,class:h(["embla-thumbs__slide",l===e(y)?"active":""]),onClick:Q=>L(l)},null,10,Y))),128))]),content:c(()=>[(s(!0),i(C,null,$(e(n).main,(u,l)=>(s(),i("li",{key:l},[b(f,{to:e(p)(u),class:"slider-content block"},{default:c(()=>[o("div",q,[o("img",{id:`home-hero-${l}`,class:"full-dimen opacity-0",alt:t.$t("invent.si"),"data-src":e(d)(u.image),height:"100",width:"100"},null,8,D)])]),_:2},1032,["to"])]))),128))]),_:1},8,["class","image-count","onOnChange"]),o("img",{class:h(["full-dimen placeholder-img",{"img-loaded":e(_)}]),alt:t.$t("invent.si"),height:"100",width:"100",src:e(d)(e(n).main[0].image)},null,10,G)])]),e(r)||e(a)?(s(),i("div",J,[e(r)?(s(),B(f,{key:0,to:e(p)(e(r)),class:"img-wrap block"},{default:c(()=>[o("img",{src:e(d)(e(r).image),height:"100",width:"100",alt:t.$t("invent.si")},null,8,K)]),_:1},8,["to"])):k("",!0),e(a)?(s(),B(f,{key:1,to:e(p)(e(a)),class:"img-wrap block"},{default:c(()=>[o("img",{src:e(d)(e(a).image),height:"100",width:"100",alt:t.$t("invent.si")},null,8,M)]),_:1},8,["to"])):k("",!0)])):k("",!0)],2)])):(s(),i("div",P,m[1]||(m[1]=[o("div",{class:"shimmer",style:{height:"100%"}},null,-1)])))])}}};export{x as default};
