import{makeStyleResponsive as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i,template as a}from"@gem-sdk/core";import{getSettingPreloadData as r}from"../../helpers.js";import{createStyle as d,createClass as l,createStateOrContext as o}from"@gem-sdk/system";import{getContainerStyles as m,getContentStyles as p}from"../common/styles.js";import{getContainerClasses as c}from"../common/classes.js";let g=({children:g,builderAttrs:n,setting:$,style:k,builderProps:f,advanced:y,pageContext:u})=>{let{width:b,position:v,display:S,preloadBgImage:h,background:j,isScrollToTop:E}=$??{},w=y?.d,C=d({...e("w",b),...m({position:v,display:S})}),q=d(p({setting:$,style:k,uid:f?.uid,pageContext:u??{},type:"Liquid"})),x=l(c({uid:f?.uid,isScrollToTop:E,cssClass:y?.cssClass,isLiquid:!0})),A=o({uid:f?.uid,setting:{display:{desktop:S?.desktop,tablet:S?.tablet??S?.desktop,mobile:S?.mobile??S?.tablet??S?.desktop}},advanced:{d:w}}),G=`.drawer-page-content {
       transform: none !important;
      -webkit-transform: none !important;
  }`;return a`
    ${s(!!h,`${s(!!j?.desktop?.image?.src,`<link rel="preload" href="${j?.desktop?.image?.src}" as="image" />`)}${s(!!j?.tablet?.image?.src,`<link rel="preload" href="${j?.tablet?.image?.src}" as="image" />`)}${s(!!j?.mobile?.image?.src,`<link rel="preload" href="${j?.mobile?.image?.src}" as="image" />`)}`)}
    <gp-sticky
    data-id="${f?.uid}"
      gp-data='${JSON.stringify(A)}'
      id="${f?.uid}"
      data-id="${f?.uid}"
      class="${x} ${r("gps-lazy")}"
      style="${C}"
    >
      <style>${G}</style>
      <div ${{...n}} style="${{...q}}">
        ${g}
      </div>
    </gp-sticky>
    ${s(t,`<script ${r('class="gps-link" delay',"src")}="{{ 'gp-sticky-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${r('class="gps-link" delay',"src")}="${i}/assets-v2/gp-sticky-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
  `};export{g as default};
