"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:o,priority:m,className:h,aspectRatio:p,pageContext:g,pictureClass:u,borderRadius:L,...$}=i,{getDeviceSource:y}=s.getAdaptiveImageData(i),{srcDesktop:b,srcTablet:n,srcMobile:w}=y({isLiquid:!0}),k=t.createAttr({src:g?.enableLazyLoadImage&&!m?s.createBlurDataURL(o?.desktop?.width??0,o?.desktop?.height??0):b,"data-src":b}),I=t.createStyle({...r.getAdaptivePictureStyles()}),q=t.createStyle({...r.getAdaptiveImageStyles({layout:c,aspectRatio:p,borderRadius:L}),...l}),v=t.createClass({...a.getAdaptiveImageClasses({className:h,hasLazyLoad:!m&&g?.enableLazyLoadImage,hasForceLoad:g?.isOptimizePlan})});return e.template`
    <picture style="${I}" class="${u}">
      ${e.template`
      ${w?`<source media="(max-width: 767px)" data-srcSet="${w}" srcset="${g?.enableLazyLoadImage&&!m?s.createBlurDataURL(o?.mobile?.width??o?.tablet?.width??o?.desktop?.width??0,o?.mobile?.height??o?.tablet?.height??o?.desktop?.height??0):w}" />`:""}
      ${n?`<source media="(max-width: 1024px)" data-srcSet="${n}" srcset="${g?.enableLazyLoadImage&&!m?s.createBlurDataURL(o?.tablet?.width??o?.desktop?.width??0,o?.tablet?.height??o?.desktop?.height??0):n}" />`:""}
    `}
      ${e.template`
      <img
        ${{...$}}
        ${{...k}}
        alt="${d}"
        width="100%"
        style="${q}"
        class="${v}"
      />
    `}
    </picture>
  `};
