1import{u as j,a as N,j as e}from"./mui-BAY0EgUh.js";import{a,L as y}from"./react-C-pmN5Hv.js";import{V as b}from"./virtual-a5_q_18m.js";import{N as S}from"./navigation-BTOXsGaK.js";import{S as P,a as M}from"./swiper-react-Cx0ioG8f.js";import{P as T}from"./ProductCard-D7vUdhpn.js";import{C as V}from"./chevron-right-C3gH_QHB.js";import"./swiper-Cf3Tae48.js";import"./formatters-lE0J6AnS.js";import"./vendor-DtY_l6si.js";import"./map-pin-TvgdZ2dk.js";import"./createLucideIcon-DG8lbe9X.js";function _({title:t="",data:c=[],type:x="",viewAllPath:m="",mobileHeight:h=360,desktopHeight:w=500}){const u=j(),g=N(u.breakpoints.down("sm")),s=Array.isArray(c)?c:[],r=a.useMemo(()=>(t||"slider").toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9\-]/g,""),[t]),i=a.useMemo(()=>`prev-${r}`,[r]),n=a.useMemo(()=>`next-${r}`,[r]),o=s.length>5,d=s.length>2,v=a.useMemo(()=>({className:"swiper tf-sw-product-sell wrap-sw-over",slidesPerView:5,spaceBetween:30,breakpoints:{1024:{slidesPerView:5,spaceBetween:30},640:{slidesPerView:3,spaceBetween:20},0:{slidesPerView:2,spaceBetween:15}},modules:[S,b],navigation:o?{prevEl:`.${i}`,nextEl:`.${n}`}:!1,virtual:s.length>24,allowTouchMove:d,watchOverflow:!0,observeParents:!0,observer:!0,preloadImages:!1,updateOnWindowResize:!0}),[o,d,i,n,s.length]),f=g?h:w;return e.jsx("section",{className:x==="related"?"flat-spacing-10 pb-5 pt-30":"",style:{minHeight:f},children:e.jsxs("div",{className:"container",children:[e.jsx("div",{style:{marginBottom:"1rem",marginTop:10},children:e.jsxs("div",{className:"d-flex justify-content-between align-items-center",style:{marginBottom:"0.25rem"},children:[e.jsx("h2",{className:"fw-bold m-0",style:{fontSize:"18px",lineHeight:1.1},children:t}),m&&e.jsxs(y,{to:m,className:"d-flex align-items-center text-danger text-decoration-none",style:{color:"#CE464A",fontSize:14,fontWeight:600},children:["Lihat Semua ",e.jsx(V,{size:16,className:"ms-1"})]})]})}),e.jsxs("div",{className:"hover-sw-nav hover-sw-2",style:{marginTop:0,paddingTop:0},children:[e.jsx(P,{...v,children:s.map((l,p)=>e.jsx(M,{virtualIndex:p,className:"swiper-slide",style:{marginTop:0,paddingTop:0},children:e.jsx("div",{style:{marginTop:0},children:e.jsx(T,{product:l})})},l.id??l.slug??p))}),o&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`nav-sw nav-prev-slider nav-prev-product box-icon w_46 round ${i}`,style:{left:0,right:"auto"},children:e.jsx("span",{className:"icon icon-arrow-left"})}),e.jsx("div",{className:`nav-sw nav-next-slider nav-next-product box-icon w_46 round ${n}`,style:{right:0,left:"auto"},children:e.jsx("span",{className:"icon icon-arrow-right"})})]})]})]})})}export{_ as default}; 2//# sourceMappingURL=ProductWithSwiper-bPYoxUKz.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.