"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("@gem-sdk/system"),a=require("../common/classes.js"),s=require("../common/helpers.js"),r=require("../common/styles.js");exports.default=i=>{let{alt:d,style:l,layout:c,srcSet:h,priority:o,className:m,aspectRatio:p,pageContext:u,pictureClass:g,borderRadius:$,enableLazyLoadImage:y=!0,...w}=i,{getDeviceSource:k}=s.getAdaptiveImageData(i),{srcDesktop:b,srcTablet:L,srcMobile:n}=k({isLiquid:!0}),q=t.createAttr({src:y&&!o?s.createBlurDataURL(h?.desktop?.width??0,h?.desktop?.height??0):b,"data-src":b}),v=t.createStyle({...r.getAdaptivePictureStyles()}),x=t.createStyle({...r.getAdaptiveImageStyles({layout:c,aspectRatio:p,borderRadius:$}),...l}),S=t.createClass({...a.getAdaptiveImageClasses({className:m,hasLazyLoad:!o&&y,hasForceLoad:u?.isOptimizePlan})});return e.template`
    <picture style="${v}" class="${g}">
      ${e.template`
      ${n?`<source media="(max-width: 767px)" data-srcSet="${n}" srcset="${y&&!o?s.createBlurDataURL(h?.mobile?.width??h?.tablet?.width??h?.desktop?.width??0,h?.mobile?.height??h?.tablet?.height??h?.desktop?.height??0):n}" />`:""}
      ${L?`<source media="(max-width: 1024px)" data-srcSet="${L}" srcset="${y&&!o?s.createBlurDataURL(h?.tablet?.width??h?.desktop?.width??0,h?.tablet?.height??h?.desktop?.height??0):L}" />`:""}
    `}
      ${e.template`
      <img
        ${{...w}}
        ${{...q}}
        alt="${d}"
        width="100%"
        style="${x}"
        class="${S}"
      />
    `}
    </picture>
  `};
