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