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