import{ao as n,aI as c,gY as d,ap as r,M as o}from"./app-k0jcl5PQ.js";const h="_left_1r3w0_1",f="_leftWithImage_1r3w0_10",_="_bgCover_1r3w0_14",b="_bgFull_1r3w0_17",C="_right_1r3w0_20",w="_rightContent_1r3w0_28",N="_narrowContent_1r3w0_34",x="_logo_1r3w0_37",v="_buttonContainer_1r3w0_43",j="_blur_1r3w0_53",I="_imageContainer_1r3w0_65",y="_imagePosition_1r3w0_73",B="_image_1r3w0_65",$="_thumbnail_1r3w0_87",L="_tallposter_1r3w0_90",k="_cover_1r3w0_96",P="_contentBody_1r3w0_102",S="_contentBodyBase_1r3w0_106",t={left:h,leftWithImage:f,bgCover:_,bgFull:b,right:C,rightContent:w,narrowContent:N,logo:x,buttonContainer:v,blur:j,imageContainer:I,imagePosition:y,image:B,thumbnail:$,tallposter:L,cover:k,contentBody:P,contentBodyBase:S};function U(e){switch(e){case o.Video:case o.Interactive:case o.Clip:return t.thumbnail;case o.Subject:case o.Playlist:return t.cover;case o.Series:return t.tallposter;default:return""}}function l(e){return n.jsx("div",{className:"d-flex",children:e.children})}function M(e){return n.jsx("div",{className:`${t.left} ${e.className?e.className:""}`,children:e.children})}function W(e){const[a,i]=c.useState(!1),[s,m]=c.useState("");return c.useEffect(()=>{if(!e.imageUrl){const u=e.fallbackImages[Math.floor(Math.random()*e.fallbackImages.length)];m(u.bgUrl);return}const g=new Image;return g.onload=()=>i(!0),g.src=e.imageUrl,()=>g.onload=null},[e.imageUrl]),n.jsx("div",{className:`${t.left} ${t.leftWithImage} ${t.bgCover} bg-light`,style:{backgroundImage:s?`url('${s}')`:""},children:a&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:t.blur,style:{backgroundImage:`url('${e.imageUrl}')`}}),n.jsx("div",{className:`${t.imageContainer} ${U(e.objectType)}`,children:n.jsx("div",{className:t.imagePosition,children:n.jsx("img",{className:t.image,src:e.imageUrl,alt:e.title})})})]})})}function F(e){const[a,i]=c.useState("");return c.useEffect(()=>{const s=e.images[Math.floor(Math.random()*e.images.length)];i(s.bgUrl)},[]),n.jsx("div",{className:`${t.left} bg-blue d-flex align-items-center`,children:a&&n.jsx("img",{className:"img-fluid",src:a,draggable:!1})})}const R={cover:t.bgCover,full:t.bgFull};function T(e){const a={backgroundImage:e.imageUrl?`url("${e.imageUrl}")`:""};return e.backgroundColor&&(a.backgroundColor=e.backgroundColor),n.jsx("div",{className:`${t.left} ${t.leftWithImage} ${R[e.imageSize||"cover"]} d-flex align-items-center`,style:a,title:e.title})}function E(e){return n.jsx("div",{className:`${t.right} ${e.className?e.className:""}`,children:e.children})}function V(e){var i;const a=(e==null?void 0:e.logoComponent)||d;return n.jsxs("div",{className:"position-relative",children:[!!e.bannerComponent&&e.bannerComponent,n.jsx("div",{className:r(t.logo,"position-absolute",(i=e.className)==null?void 0:i.logoContainer),children:n.jsx(a,{})}),e.children]})}function z(e){return n.jsx("div",{className:r(t.rightContent,"d-flex flex-column justify-content-center h-100",e==null?void 0:e.className),children:e.children})}const H={base:t.contentBodyBase,full:""};function O(e){const a=H[e.width||"base"];return n.jsx("div",{className:r(t.contentBody,a,"m-auto p-3",e.className),children:e.children})}l.NarrowContent=Y;function Y(e){return n.jsx("div",{className:`${t.narrowContent} mx-auto w-100 ${e.className?e.className:""}`,children:e.children})}function q(e){return n.jsx("div",{className:r("position-fixed bg-white d-flex align-items-center",t.buttonContainer,e==null?void 0:e.className),children:e.children})}l.Left=M;l.LeftImage=W;l.LeftProductImage=F;l.LeftImageWithBackground=T;l.Right=E;l.Header=V;l.Content=z;l.ContentBody=O;l.Buttons=q;export{l as L};
//# sourceMappingURL=CCKlkV4O.chunk.js.map
