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