import{template as s}from"@gem-sdk/core";import{createStyle as e,createClass as t,createAttr as i,If as m}from"@gem-sdk/system";import{getLinkData as o}from"../../helpers.js";import r from"./AdaptiveImage.liquid.js";import l from"./NextImage.liquid.js";import{getWrapperStyles as a,getImageStyles as p,getContainerStyles as d}from"../common/styles.js";import{getWrapperClasses as u,getImageClasses as c,getContainerClasses as f}from"../common/classes.js";import{getContainerAttrs as n,getAdaptiveImageAttrs as $,getNextImageAttrs as g,getLinkWrapperAttrs as j,getImageLiquidAttrs as y}from"../common/attrs.js";import{getSettingTranslatedImageAndSeo as q}from"../common/helpers.js";let v=({style:v,styles:h,setting:I,advanced:L,className:N,pageContext:k,builderAttrs:x,builderProps:W})=>{let A=q({setting:I,uid:W?.uid,pageContext:k}),{imageLink:C,isAdaptive:b,enableImageLink:w}=A??{},{Wrapper:z,urlData:B}=o({defaultWrap:"div",setting:C,enableImageLink:w,isLiquid:!0}),D=e(a(h)),E=e(p(h,W)),F=e(d(v,h)),G=t(u()),H=t(c(N,h)),J=t(f(W?.uid,L?.cssClass,h?.shape)),K=i(n(x,W?.uid)),M=j({urlData:B,imageLink:C,title:A?.title,isLiquid:!0}),O=$({styles:h,setting:A,isLiquid:!0}),P=g({styles:h,setting:A}),Q=y({pageContext:k});return s`
    <div
      role="presentation"
      ${{...K}}
      style="${F}"
      class="${J}"
    >
      <${z}
        ${M}
        style="${D}"
        class="${G}"
      >
        ${m(b,r({...Q,...O,style:E,className:H}),l({...Q,...P,style:E,className:H}))}
      </${z}>
    </div>
  `};export{v as default};
