'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),t=require("../../../grid/components/row/Row.js"),r=require("@gem-sdk/system"),a=require("./common/classes.js"),l=require("./common/styles.js"),n=require("./common/helpers.js"),i=require("../../../link/components/Link.js");exports.default=({builderAttrs:c,builderProps:o,setting:u,style:d,children:m,advanced:g})=>{let y=s.useCollection(),{isPreviewSharePageMode:C,isEditMode:j}=s.useRenderMode(),{link:k,layout:p,width:q,verticalGutter:v,verticalAlign:x,horizontalAlign:f}=u??{};n.updateBackroundImageSrc({setting:u,collectionSrc:y?.collectionMedia?.src});let S=r.createClass({...a.getClassContainerBanner({builderProps:o,setting:u,advanced:g})}),h=r.createClass({...a.getClassContainerBackgoundImage({setting:u})}),B=r.createClass({...a.getClassOverlayBanner({setting:u})}),I=r.createClass({...a.getClassLinkBanner()}),b=r.createStyle({...l.getDimension({setting:u,style:d})}),N=r.createStyle({...l.getStyleOverlay({setting:u})}),O=r.createStyle({...l.getStyleContainerBackgoundImage({setting:u,hasCollectionImage:!1})}),M=!!k?.link&&!j&&!C;return e.jsxs("div",{...c,className:S,style:b,children:[e.jsx("div",{className:h,style:O}),e.jsx("div",{"aria-label":"Overlay",className:B,style:N}),r.If(M,e.jsx(i.default,{setting:{href:k?.link,target:k?.target},className:I})),e.jsx(t.default,{setting:{layout:p,horizontalAlign:f,verticalAlign:x},styles:{verticalGutter:v,width:q,fullWidth:{desktop:!1,tablet:!1,mobile:!1}},style:d,children:m})]})};
