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