"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[2249],{59106:(e,a,i)=>{i.d(a,{A:()=>I}),i(63696);var l=i(91785),n=i(83051),t=i(20641),r=i(35289),d=i(11545),o=i(468),s=i(74437),p=i(16061),c=i(61223),u=i(27336),h=i(26478),m=i(15173),g=i(41738),A=i(62540),v=(0,n.default)("div",{target:"e1ceq7s58",label:"Container"})(t.tc," background:",(e=>{var{isOppm:a,theme:i}=e;return a&&i.colourPalette.background}),";display:",(e=>{var{isPlayerShowing:a}=e;return a?"flex":"none"}),";flex-direction:column;position:relative;overflow:visible;",(e=>{var{isInFakeFullscreen:a}=e;return a&&"z-index: ".concat(p.o.LIVE_EXPERIENCE_HEADER_WRAPPER,";")}),";"),w=(0,n.default)("div",{target:"e1ceq7s57",label:"MediaContainer"})("color:",(e=>{var{theme:a}=e;return a.colourPalette.background}),";flex-direction:column;",(e=>{var{isOppm:a,isAudioContent:i}=e;return a?(0,l.AH)("display:flex;justify-content:center;z-index:",p.o.MEDIA_CONTAINER,";@media (min-width: ",r.js,"){width:",i?"50%":"100%",";margin:",i?"0 auto":null,";}"):(0,l.AH)("display:flex;justify-content:left;z-index:",p.o.MEDIA_CONTAINER,";@media (min-width: ",r.js,"){width:",i?"50%":"100%",";margin:",i?"0 auto":null,";}")}),";"),y=(0,n.default)("div",{target:"e1ceq7s56",label:"MediaChildrenContainer"})("z-index:1;padding-bottom:0;@media (min-width: ",r.cK,"){padding-bottom:",s.SPACING_6,";}"),f=(0,n.default)("div",{target:"e1ceq7s55",label:"MediaPlayerContainer"})("grid-column:2;display:grid;grid-template-columns:1fr;row-gap:",s.SPACING_4,";padding-top:",s.SPACING_2,";@media (max-width: ",(0,o.A)(r.R4-1),"){margin:auto;width:100%;}"),b=(0,n.default)("div",{target:"e1ceq7s54",label:"MediaHeading"})("display:flex;flex-wrap:wrap;gap:",s.SPACING_2,";"),C=(0,n.default)("div",{target:"e1ceq7s53",label:"MediaPlayerChildrenContainer"})((e=>{var{isInFakeFullscreen:a}=e;return!a&&" grid-area: 2 / 1 / 2 / 3;"}),";"),x=(0,n.default)("div",{target:"e1ceq7s52",label:"MediaPlayerCloseWrapper"})("aspect-ratio:1/1;height:",(0,o.A)(44),";width:",(0,o.A)(44),";padding-right:",(0,o.A)(2),";"),P=(0,n.default)("p",{target:"e1ceq7s51",label:"MediaTitleWrapper"})(t.NP," ",d.K1," color:",(e=>{var{theme:a}=e;return a.colourPalette.states.onLive}),";align-self:center;word-wrap:break-word;"),_=(0,n.default)("p",{target:"e1ceq7s50",label:"ChannelAttributionWrapper"})(t.tc," ",d.K1," color:",(e=>{var{theme:a}=e;return a.colourPalette.states.onLive}),";align-self:center;word-wrap:break-word;"),E=e=>{var{showWrap:a,children:i}=e;return a?(0,A.jsx)(c.A,{children:i}):i};const I=e=>{var a,i,l,n,{media:t,title:r,setMediaValues:d,isPlayerShowing:o=!1,leadMediaUrn:s,focusId:p,channelAttribution:c,isOppm:I,service:j,shouldAutoplay:M,enableChaptersAndMomentsPlugin:O,enableAppBridge:S,handleSMPEvents:N,isInFakeFullscreen:k}=e,F=(0,g.Dn)(),L=m.W[F]||m.W.default,D=null!=t&&null!==(a=t.analytics)&&void 0!==a&&null!==(a=a.page)&&void 0!==a&&a.destination?{page:{destination:null==t||null===(i=t.analytics)||void 0===i||null===(i=i.page)||void 0===i?void 0:i.destination,name:null==t||null===(l=t.analytics)||void 0===l||null===(l=l.page)||void 0===l?void 0:l.name,producer:(null==t||null===(n=t.analytics)||void 0===n||null===(n=n.page)||void 0===n?void 0:n.producer)||(null==j?void 0:j.toUpperCase())}}:void 0,{playerMode:q}=t?t.items[0]:"full",T="mini"===q,W=c&&"BBC Live Streams"!==c;return(0,A.jsx)(v,{"data-testid":"media-header-container",isPlayerShowing:o,isOppm:I,isInFakeFullscreen:k,children:(0,A.jsx)(y,{children:(0,A.jsx)(E,{showWrap:I,children:(0,A.jsx)(w,{"data-testid":"player-container",isOppm:I,isAudioContent:T,isInFakeFullscreen:k,children:(0,A.jsxs)(f,{isOppm:I,children:[(0,A.jsxs)(b,{children:[r&&(0,A.jsx)(P,{children:r}),W&&(0,A.jsx)(_,{children:c})]}),(0,A.jsx)(x,{children:(0,A.jsx)(u.A,{iconOnly:!0,emphasis:"low",iconType:"actions:close",onClick:()=>{"#player"===window.location.hash&&window.history.pushState("",document.title,window.location.pathname+window.location.search),p&&document.getElementById(p).focus(),window.embeddedMedia.api.players().bbcMediaPlayer0.suspend(),d({isPlayerShowing:!1,mediaToPlay:s})},width:"full",children:L.CLOSE})}),t&&(0,A.jsx)(C,{"data-testid":"media-player-wrapper",isInFakeFullscreen:k,children:(0,A.jsx)(h.A,{media:o?t:{items:[],analytics:D,smpAppName:t.smpAppName,smpAppType:t.smpAppType,isToucanEnabled:!0},uiOptions:{poster:{enabled:!0},cta:{backgroundColour:"#000"}},shouldAutoplay:M,onStateChanged:N,enableChaptersAndMomentsPlugin:O,enableAppBridge:S})})]})})})})})}}}]);