'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),s=require("@gem-sdk/system"),r=require("./AdaptiveImage.js"),a=require("./NextImage.js"),l=require("../common/styles.js"),i=require("../common/classes.js"),c=require("../common/attrs.js"),n=require("../../helpers.js");exports.default=({style:o,styles:u,setting:g,children:m,advanced:d,className:p,builderAttrs:y,builderProps:j,onLoad:C,onClick:q})=>{let{imageLink:x,isAdaptive:A,enableImageLink:I}=g??{},f=t.useEditorMode(),{Wrapper:v,urlData:N}=n.getLinkData({defaultWrap:"div",setting:x,enableImageLink:I}),S=s.createStyleReact(l.getWrapperStyles(u)),k=s.createStyle(l.getImageStyles(u,j)),W=s.createStyle(l.getContainerStyles(o,u)),h=s.createClass(i.getWrapperClasses()),L=s.createClass(i.getImageClasses(p,u)),M=s.createClass(i.getContainerClasses(j?.uid,d?.cssClass,u?.shape)),_=s.createAttr(c.getContainerAttrs(y,j?.uid)),b=c.getLinkWrapperAttrs({urlData:N,imageLink:x,title:g?.title}),D=c.getAdaptiveImageAttrs({styles:u,setting:g,mode:f}),E=c.getNextImageAttrs({styles:u,setting:g});return e.jsxs("div",{role:"presentation",..._,style:W,className:M,onClick:q,children:[e.jsx(v,{...b,style:S,className:h,children:s.If(A,e.jsx(r.default,{...D,style:k,className:L}),e.jsx(a.default,{...E,style:k,className:L,onLoad:C}))}),m]})};
