'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("../common/helpers.js"),s=require("@gem-sdk/system"),t=require("../common/classes.js"),r=require("../common/styles.js");const l=l=>{let{alt:c,style:d,srcSet:i,layout:m,priority:o,className:g,aspectRatio:u,borderRadius:n,pictureClass:y,pageContext:p,...L}=l,{getDeviceSource:x}=a.getAdaptiveImageData(l),{srcTablet:A,srcMobile:j}=x(),I=s.createAttr({loading:o?"eager":"lazy",src:i?.desktop?.src||a.FALLBACK_IMAGE}),h=s.createStyleReact({...r.getAdaptivePictureStyles()}),v=s.createStyle({...r.getAdaptiveImageStyles({layout:m,aspectRatio:u,borderRadius:n}),...d}),E=s.createClass({...t.getAdaptiveImageClasses({className:g,hasLazyLoad:!o&&p?.enableLazyLoadImage})});return e.jsx(e.Fragment,{children:e.jsxs("picture",{style:h,className:y,children:[e.jsxs(e.Fragment,{children:[j&&e.jsx("source",{media:"(max-width: 767px)",srcSet:p?.enableLazyLoadImage?a.IMAGE_PLACEHOLDER:j}),A&&e.jsx("source",{media:"(max-width: 1024px)",srcSet:p?.enableLazyLoadImage?a.IMAGE_PLACEHOLDER:A})]}),e.jsx("img",{...L,...I,alt:c,width:"100%",style:v,className:E,draggable:"false"})]})})};l.defaultProps={layout:{desktop:"cover"}},exports.default=l;
