'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("./HeroBannerItem.js"),s=require("../common/attrs.js"),t=require("../common/styles.js"),a=require("../common/classes.js"),i=require("@gem-sdk/system"),n=require("@gem-sdk/core"),l=require("../common/helpers.js"),o=require("../hooks/useHeroBanner.js"),u=require("react");exports.default=d=>{let{builderAttrs:c,builderProps:m,setting:f,styles:g,style:j,children:C,advanced:h,pageContext:q}=d,{isEditMode:p,isPreviewSharePageMode:v}=n.useRenderMode(),{enableLink:y}=f??{},k=l.getBannerLink(f),{cssClass:x}=h??{},R=n.useCurrentDevice(),{elementRef:b,transform:w,onMouseEnterParallax:A,onMouseLeaveParallax:B,dataVideo:L,bgRef:M,isShowVideoHtml5:H,openLinkBanner:I,layoutResponsive:P}=o.default(g,f,R),S=u.useRef(null),N=!!k?.link&&y&&!p&&!v,V=i.createAttr({...s.getAttr({uid:m?.uid||""})}),_=i.createAttr({...s.getAttrLink()}),D=i.createStyle({...t.getStyle(g,f,j)}),E=i.createClass({...a.getClasses({setting:f,builderProps:m,advancedCssClass:x})}),O=i.createClass({...a.getLinkClasses()}),T=()=>e.jsx(r.default,{setting:f,styles:g,children:C,rawChildren:d.rawChildren,builderProps:m,pageContext:q,elementRef:b,transform:w,dataVideo:L,layoutResponsive:P,bgRef:M,isShowVideoHtml5:H,heroBannerWrapperRef:S});return e.jsxs("div",{ref:S,...c,...V,className:E,style:D,onMouseEnter:A,onMouseLeave:B,children:[i.If(!N,T()),i.If(N,e.jsx("div",{..._,"aria-hidden":"true",onClick:I,className:O,children:T()})),n.filterToolbarPreview(C,!0)]})};
