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