'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:h,advanced:q,enableLazyLoadImage:y=!0}=d,{isEditMode:C,isPreviewSharePageMode:v}=n.useRenderMode(),{enableLink:k}=f??{},p=l.getBannerLink(f),{cssClass:x}=q??{},L=n.useCurrentDevice(),{elementRef:R,transform:b,onMouseEnterParallax:w,onMouseLeaveParallax:A,dataVideo:B,bgRef:I,isShowVideoHtml5:M,openLinkBanner:H,layoutResponsive:P}=o.default(g,f,L),S=u.useRef(null),N=!!p?.link&&k&&!C&&!v,V=i.createAttr({...s.getAttr({uid:m?.uid||""})}),_=i.createAttr({...s.getAttrLink()}),z=i.createStyle({...t.getStyle(g,f,j)}),D=i.createClass({...a.getClasses({setting:f,builderProps:m,advancedCssClass:x})}),E=i.createClass({...a.getLinkClasses()}),O=()=>e.jsx(r.default,{setting:f,styles:g,children:h,rawChildren:d.rawChildren,builderProps:m,enableLazyLoadImage:y,elementRef:R,transform:b,dataVideo:B,layoutResponsive:P,bgRef:I,isShowVideoHtml5:M,heroBannerWrapperRef:S});return e.jsxs("div",{ref:S,...c,...V,className:D,style:z,onMouseEnter:w,onMouseLeave:A,children:[i.If(!N,O()),i.If(N,e.jsx("div",{..._,"aria-hidden":"true",onClick:H,className:E,children:O()})),n.filterToolbarPreview(h,!0)]})};
