"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("./index2.js"),t=require("react"),s=new Set([r.anonymous]),o=({videoPlayerController:e})=>{const s=r.B(),o=t.useRef();return t.useEffect(()=>{if(s)return o.current=e,s.addVideoPlayerController(o.current),()=>{o.current&&s.removeVideoPlayerController(o.current)}},[s]),null},n=({sdk:e})=>(t.useEffect(()=>{e.anonymousAuthorization()},[e]),null),i=({persistent:t,notification:s,banner:o,sdk:n})=>{const i=r.useStore(n.uiState);return i.exposedPauseAd?null:o?e.jsx(r.ge,{sdk:n,persistent:t,banner:"bottom"}):s?i.promotionNotification?e.jsx(r.ge,{sdk:n,notification:!0,persistent:t,sidebar:"right"}):e.jsx(r.Z,{sdk:n,notification:!0,persistent:t}):i.promotionSidebar?e.jsx(r.ge,{sdk:n,persistent:t,sidebar:"right"}):e.jsx(r.Z,{sdk:n,persistent:t})};exports.useStreamLayer=r.B,exports.useStreamLayerTheme=r.z,exports.useStreamLayerUI=r.F,exports.StreamLayerProvider=({children:t,videoPlayerController:n,...i})=>e.jsxs(r.q,{...i,themeMode:"dark",withAd:!0,skipOnboarding:!0,withAdNotification:!0,autoEnable:!0,plugins:s,friendsTab:"disabled",hideFriends:!0,webOS:!0,children:[t,n&&e.jsx(o,{videoPlayerController:n})]}),exports.StreamLayerSDKTv=({persistent:s,children:o,showPauseAd:i,pauseAdVastUrl:a,videoPlayerController:d,onRenderPauseAd:l,onClosePauseAd:u,options:c})=>{const m=r.B(),h=r.z(),p=t.useRef();return t.useEffect(()=>{if(m)return d&&(p.current=d,m.addVideoPlayerController(p.current)),()=>{p.current&&m.removeVideoPlayerController(p.current)}},[m]),m?e.jsx("div",{className:"StreamLayerSDK",children:e.jsxs(r.h,{customTheme:h.theme,themeMode:h.themeMode,children:[e.jsx(r.W,{sdk:m,persistent:s,showPauseAd:i,onRenderPauseAd:l,pauseAdVastUrl:a,onClosePauseAd:u,options:c,children:o}),e.jsx(n,{sdk:m})]})}):null},exports.StreamLayerSDKTvContent=t=>{const s=r.B(),o=r.z();return s?e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(r.h,{style:{position:"relative"},customTheme:o.theme,themeMode:o.themeMode,children:e.jsx(i,{sdk:s,...t})})}):null},exports.StreamLayerSDKTvPauseAd=t=>{const s=r.B(),o=r.z();return s?e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(r.h,{style:{position:"relative"},customTheme:o.theme,themeMode:o.themeMode,children:e.jsx(r.te,{...t,sdk:s,isDesktop:!1})})}):null};
