import e from"./HeroBannerItem.liquid.js";import{getAttr as r,getAttrLink as t}from"../common/attrs.js";import{getStyle as o}from"../common/styles.js";import{getClasses as s,getLinkClasses as a}from"../common/classes.js";import{createStateOrContext as i,createAttr as n,createStyle as l,createClass as d,If as c}from"@gem-sdk/system";import{dataStringify as m,template as p,RenderIf as f,isLocalEnv as u,baseAssetURL as g}from"@gem-sdk/core";import{getBackgroundTranslated as h,getInsertLinkData as v,getSettingPreloadData as b}from"../../helpers.js";import{getResponsiveSetting as $,getBannerLink as j}from"../common/helpers.js";import{HeroBanner as k}from"../settings/configs/translate.js";let E=E=>{let{builderAttrs:y,builderProps:C,setting:P,styles:S,style:x,children:B,advanced:T,pageContext:V}=E,{enableLazyLoadImage:H}=V??{},{enableLink:M,enableParallax:N}=P??{},O=h({background:S?.background,uid:C?.uid,enableTranslate:!!k?.background?.id,pageContext:V??{},isTranslateVideo:!0}),R=j(P),{cssClass:_}=T??{},{urlData:w}=v("",R),z=i({background:$(O||{}),uid:C?.uid,enableParallax:N&&Number(P?.speedParallax||0)>0,speedParallax:Number(P?.speedParallax)||0,hoverEffect:S?.hoverEffect,hoverEffectScale:S?.hoverEffectScale,layout:P?.layout,contentPosition1Col:S?.contentPosition1Col,contentPosition2Col:S?.contentPosition2Col,aspectRatio:P?.aspectRatio,sizeSetting:$(S?.sizeSetting||{}),videoObjectFit:$(S?.videoObjectFit||{}),target:R?.target??"_self",href:w?.href??"",linkType:R?.type??"",hoverEffectDuration:S?.hoverEffectDuration,isYoutubeVideoMigrated:P?.isYoutubeVideoMigrated}),A=!!R?.link&&M,D=n({...r({uid:C?.uid||""})}),F=n(t()),G=l({...o(S,P,x)}),I=d({...s({setting:P,builderProps:C,advancedCssClass:_})}),Y=d({...a()}),q=()=>e({setting:P,translatedBackground:O,styles:S,children:B,enableLazyLoadImage:H,rawChildren:E.rawChildren,builderProps:C,pageContext:V});return p`
      <gp-hero-banner
        ${{...y}}
        ${{...D}}
        class="${I}"
        style="${G}"
        gp-data='${m(z)}'
      >
        ${c(!A,q())}
        ${c(A,p`
          <div
            ${{...F}}
            aria-hidden="true"
            class="${Y}"
          >
            ${q()}
          </div>`)}
      </gp-hero-banner>
       ${f(u,`<script ${b('class="gps-link" delay',"src")}="{{ 'gp-hero-banner-v2-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${b('class="gps-link" delay',"src")}="${g}/assets-v2/gp-hero-banner-v2-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
`)}
  `};export{E as default};
