import{template as o,WrapRenderChildren as r,RenderChildren as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-sdk/core";import a from"../arrow/Arrow.liquid.js";import d from"../dot/Dots.liquid.js";import{mappingNavigationCarousel as l}from"../arrow/common/helpers.js";import{getData as m}from"./common/helpers.js";import{getClass as p}from"./common/classes.js";import{getStyle as n}from"./common/styles.js";import{getAttr as c}from"./common/attrs.js";import{getStaticLocale as u,getSettingPreloadData as $}from"../../../helpers.js";let v=v=>{let{children:f,builderAttrs:w,builderProps:g,styles:h,isHiddenArrowWhenDisabled:S=!0,hiddenDotWhenOnlyOne:y,rootId:j,rawChildren:C,conditionAppendJs:k,productBadgeLiquid:E}=v,I=l(v.setting),A={...v,setting:I},{arrowButtonSize:G,arrowBackgroundColor:T,arrowGapToEachSide:b="16",roundedArrow:q,arrowIconSize:x,arrowCustomColor:z,arrowBorder:B,arrowShadow:D,showWhenHover:O}=I??{},{uniqueComponentId:P,loopConfig:W,arrowShowConfig:_,stateData:H}=m(A),{rootClassRender:M,wrapperClassRender:N,wrapperInnerClass:R,sliderClass:U}=p(A),{sliderWrapperStyle:V,rootStyleRender:F,wrapperStyleRender:J,wrapperInnerStyle:K}=n(A),{rootAttrRender:L,sliderAttr:Q}=c(A),X=()=>s(t,`<script ${$('class="gps-link" delay',"src")}="{{ 'gp-carousel-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${$('class="gps-link" delay',"src")}="${i}/assets-v2/gp-carousel-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`),Y=o=>a({uid:g?.uid,componentId:P,custom:I?.arrowCustom??"",showArrow:_,arrowButtonSize:G||{},arrowIconSize:x||{},arrowBackgroundColor:T??"",arrowCustomColor:z,gapToEachSize:b,showWhenHover:O,arrowBorder:B||{},arrowCorner:q||{},arrowShadow:D||{},left:"next"!==o,vertical:I?.vertical,isHiddenWhenDisabled:S,rootId:j});return o`
    <gp-carousel-v3 gp-data='${H}' ${L} style="${F}" class="${M}">
      <div
        ${w}
        class="${N}"
        style="${J}"
      >
        <div class="${R}" style="${K}">
          ${E??""}
          ${Y("prev")}
          <div ${Q} style="${V}">
            <div class="${U}">
              ${o`
    ${C?.length?r({uid:g?.uid??"",customProps:C[0]?.customProps},C.map((r,s)=>{if(r)return o`${e({...r,index:s,parentSettings:I,parentStyle:h,background:I?.background,parentUid:g?.uid})}`})):f??`<div>${u("Carousel","no_slider")}</div>`}`}
            </div>
          </div>
          ${Y("next")}
        </div>
        ${d({loop:W,showDots:I?.dot,dotStyle:I?.dotStyle,dotGapToCarousel:I?.dotGapToCarousel,vertical:I?.vertical,uniqueComponentId:P,hiddenWhenOnlyOne:y})}
      </div>
    </gp-carousel-v3>
    ${k?`{% if ${k} %} ${X()} {% endif %}`:X()}

  `};export{v as default};
