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