1import{j as t,A as P,a as Q,r as n,V as F,M as _,_ as o,B as c,c as d,b as L,S as O,G,T as Z}from"../js/app.CzHXv3OC.js";import{B as q}from"./Button.B4XYJJnP.js";import{C as J}from"./Cover.CJodL7d1.js";import{R as K}from"./RichText.BafDqas4.js";import{E as U}from"./EmptyState.CRCj9Gxe.js";import{E as X}from"./ErrorBoundary.BSDeRbzo.js";import{r as s}from"./elastic.CDqqVJuy.js";import{F as Y}from"./FetchModel.b4lX_zup.js";import{e as f}from"./error.ME9RekgK.js";import{c as ee,d as te,e as oe}from"./button.BLXcxSDr.js";import{e as ie,f as re,h as ae,a as ne,b as se}from"./productObjectTable.8lbMw21N.js";import{A as le}from"./media.CSaM5Chm.js";import{z as ce,f as de}from"./index.D6mVWLHx.js";import{G as h}from"./Grid.CSAL5IlU.js";import{C as ge,a as pe}from"./CardContent.DsAEvmb5.js";import"./vendor.CLXKpVbq.js";import"./lodash.B7ss2v9R.js";import"./LoadingButton.IAGvwvXG.js";import"./extends.Ba-yMveS.js";import"./Button.CgtN9LhY.js";import"./Markdown.Bs47RbOr.js";const W="AEHHeroBannerHalfWidth",l=new L({name:W,prefix:"o-",outputIsString:!0}),me=ce.object({layout:ee.optional(),content:ae.optional(),link:re.optional(),media:le.extend({type:oe.optional()}).optional(),configuration:ie.extend({height:te.optional(),card:se.nullish(),table:ne.nullish()}).nullable()}),ue=({componentModel:g})=>{var j,y,k,v,H,C,w,E,S,A,M,R,B,T,N,z,$,I;const p=s.useRef(null),a=s.useRef(null),i=s.useRef(null),{navigationState:r}=Q(),[D,b]=s.useState({});s.useEffect(()=>{r.layout==="full-width"?b({marginTop:`${r.height-5}px`,[n.breakpoints.up("xs")]:{},[n.breakpoints.up("lg")]:{".o-grid__wrapper":{paddingTop:`${(r.breadcrumbHeight>0?50:30)+42}px`}}}):b({[n.breakpoints.up("xs")]:{},[n.breakpoints.up("lg")]:{".o-grid__wrapper":{paddingTop:`${(r.breadcrumbHeight>0?50:30)+42}px`}}})},[r]);const m=me.safeParse(g);if(!m.success){const{error:V}=m;return console.error(`${W}: ${de(V).toString()}`),t.jsx(U,{illustration:t.jsx(f.illustration,{}),title:f.title,description:f.description})}const{data:e}=m;let u;((j=e.media)==null?void 0:j.type)==="video"?u=t.jsx(F,{title:(y=e.media.video)==null?void 0:y.title,source:(k=e.media.video)==null?void 0:k.source,id:(v=e.media.video)==null?void 0:v.id,visible:!0,parameters:"background=1",type:"fit",width:"100%",height:"100%"}):u=t.jsx(_,{type:(H=e.media)==null?void 0:H.type,image:(C=e.media)==null?void 0:C.image,dam:(w=e.media)==null?void 0:w.dam,aspectRatio:"1:1",sizes:"(min-width: 768px) 50vw, 100vw"});let x=null;return o.get(e,"configuration.color.overlap")==="background-image"&&o.get(e,"configuration.color.image.url")&&(x=t.jsx(_,{type:"image",image:(S=(E=e.configuration)==null?void 0:E.color)==null?void 0:S.image,aspectRatio:a.current?`${a.current.offsetWidth}/${a.current.offsetHeight}`:"1:1",sizes:"(min-width: 768px) 50vw, 100vw"})),t.jsx(c,{className:l(),sx:{width:"100%",backgroundColor:d(o.get(e,"configuration.color.background"))},children:t.jsx("div",{children:t.jsxs(h,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"stretch",sx:{...D,overflow:"hidden"},children:[t.jsx(h,{item:!0,xs:12,sm:12,lg:7,order:{xs:1,sm:1,lg:0},children:t.jsxs(ge,{className:l("contentWrapper",o.get(e,"configuration.color.overlap")),ref:a,sx:[{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",height:"100%",width:"100%",borderRadius:0,boxShadow:0,fontSize:"var(--body-normal-fs-2)",backgroundColor:x?d(o.get(e,"configuration.color.background")):d(o.get(e,"configuration.color.overlap"))}],children:[t.jsx(J,{children:x}),t.jsx(pe,{className:l("content"),sx:[{zIndex:1,flexGrow:1,p:"var(--spacing-small)",padding:{xs:"var(--spacing-small)",lg:"var(--spacing-small-1)"}},r.layout!=="full-width"?{paddingTop:{xs:"50px",lg:"140px"}}:{paddingTop:{xs:"50px",lg:"initial"}}],children:t.jsxs(O,{className:"o-grid__wrapper",direction:"column",spacing:2,justifyContent:"flex-end",alignItems:"flex-start",ref:i,children:[((A=e.content)==null?void 0:A.title)&&t.jsx(G,{backgroundColor:o.get(e,"configuration.color.titleBox"),opacity:".8",children:t.jsx(Z,{text:(M=e.content)==null?void 0:M.title,size:"h1",type:"u-heading-xxl",color:o.get(e,"configuration.color.title")})}),((R=e.content)==null?void 0:R.text)&&t.jsx(G,{backgroundColor:o.get(e,"configuration.color.titleBox"),opacity:".8",children:t.jsx(K,{html:(B=e.content)==null?void 0:B.text,className:"u-body-lg",color:o.get(e,"configuration.color.title")})}),((T=e.link)==null?void 0:T.text)&&t.jsx(c,{children:t.jsx(q,{type:(N=e.link)==null?void 0:N.type,label:(z=e.link)==null?void 0:z.text,target:($=e.link)==null?void 0:$.target,link:!0,url:(I=e.link)==null?void 0:I.url,size:"large"})})]})}),t.jsx(c,{className:l("filler"),sx:{width:"100%",zIndex:"1",height:"80px",display:"none",backgroundColor:d(o.get(e,"configuration.color.background")),[n.breakpoints.up("lg")]:{display:"block"}}})]})}),t.jsx(h,{item:!0,ref:p,xs:12,sm:12,lg:5,order:{xs:0,sm:0,lg:1},children:t.jsx(c,{className:l("figure"),sx:{height:"100%",".a-image, .a-image img":{maxHeight:`${i.current&&i.current.clientHeight>300?i.current.clientHeight+300:600}px`}},children:u})})]})})})},Ie=({pathModelHTLAttribute:g,componentModelHTLAttribute:p})=>t.jsx(X,{children:t.jsx(P,{componentName:"aeh-hero-banner-half-width",children:t.jsx(Y,{pathModelHTLAttribute:g,componentModelHTLAttribute:p,children:(a,i)=>t.jsx(ue,{componentModel:i})})})});export{Ie as AEHHeroBannerHalfWidth};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.