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

  `};
