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