import{fa as E,p as L,aX as R,ay as j,az as o,aj as U,f0 as a,bw as w,dK as H,dm as N,cp as _,fb as D,fc as B,bN as k,bO as z,L as G,fd as K,fe as X,ao as s,aZ as Z,ff as J,c1 as Q}from"./app-k0jcl5PQ.js";import{u as W}from"./CtFw3Moj.chunk.js";import{u as Y}from"./CAxN5LKv.chunk.js";import{u as $}from"./DDxzgH2W.chunk.js";import{u as tt}from"./DgW9Cwsn.chunk.js";import{u as et}from"./GqZ33xmI.chunk.js";import{u as C}from"./4IZETxJX.chunk.js";import{u as ot}from"./Dw2t5TEb.chunk.js";import{P as it}from"./axiCUAs6.chunk.js";import"./DIAJ896Y.chunk.js";import"./BAuuQuuB.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./lKJuB19y.chunk.js";import"./Cukd0Qmt.chunk.js";import"./0f3cnETk.chunk.js";import"./BqNArZps.chunk.js";import"./DWt5Ov1e.chunk.js";import"./BxQFOoIR.chunk.js";import"./DdN4NAtQ.chunk.js";import"./CBiwFpxE.chunk.js";import"./BurIODLh.chunk.js";import"./BYBYoVkn.chunk.js";import"./ZlF_2kui.chunk.js";import"./Bj7bJt_4.chunk.js";import"./DlYrdKHv.chunk.js";import"./D62ACZel.chunk.js";import"./BBUCoOir.chunk.js";import"./BrY2bcAL.chunk.js";import"./BHJbqrq4.chunk.js";import"./Q_WQ5xs9.chunk.js";import"./DRX7tQDY.chunk.js";import"./BNuOjrBr.chunk.js";import"./WCBjpMHJ.chunk.js";import"./DoFMWlew.chunk.js";import"./CGYNvpr2.chunk.js";import"./CW-zLlXC.chunk.js";import"./BhYYYlpK.chunk.js";import"./FGhEvk_q.chunk.js";import"./CMnqIsoM.chunk.js";import"./CIN5bTKK.chunk.js";import"./1YwtoG9U.chunk.js";import"./BZa85bFL.chunk.js";import"./D1WNsOm8.chunk.js";import"./U4M4wGTR.chunk.js";import"./BgZMo0y9.chunk.js";import"./CX9BGBTP.chunk.js";import"./uoUaCILN.chunk.js";import"./DXJ2-V8v.chunk.js";import"./DH1mz64H.chunk.js";import"./BlKMjFEf.chunk.js";import"./CofWDDSQ.chunk.js";import"./DwvfEevL.chunk.js";import"./D9SGbB34.chunk.js";import"./BwBaQklX.chunk.js";import"./ByBCp1MC.chunk.js";import"./eerUhItV.chunk.js";import"./B31bqZwo.chunk.js";import"./f_twTV5Z.chunk.js";import"./BDeUEvb2.chunk.js";import"./Daim1zo7.chunk.js";import"./B3XH0kWB.chunk.js";import"./BRhv_AHY.chunk.js";import"./BDviDDog.chunk.js";import"./wCY37Ze3.chunk.js";import"./BUtU6IOA.chunk.js";import"./DAIetGMf.chunk.js";import"./TReHo2Ua.chunk.js";import"./Bw9otuBi.chunk.js";import"./BvnABNse.chunk.js";import"./Bh7bFXwG.chunk.js";import"./DCdUbbLx.chunk.js";import"./t24_x3Gi.chunk.js";import"./BKsI6eJC.chunk.js";import"./neLjacsa.chunk.js";import"./Bpw1_OdO.chunk.js";import"./DtIulmHQ.chunk.js";const rt="shared.playClip",at=G.encloseNamespace(rt),st={notFound:Q,forbidden:{privacy:J}};mt.defaultProps={queryParams:{}};function mt(e){var c,u,l,f,P,h;const{context:m,contextId:v,mtv:p}=e.queryParams,{hasProduct:V}=E(),{commonVideoProps:b,hasCommonVideoPropsCompleted:g}=$({locationContext:L.PlayClip,mtv:p}),{hasPermissions:y}=R(),{hasTopicDirectories:x,hasPlayPageTranscript:S}=j(null),i=o(U.currentUser()),t=o(a.clip(e.id)),q=o(w.videoInteractives(e.id)),n=o(!!((c=t.data)!=null&&c._parentVideo)&&H.video(t.data._parentVideo.id));C([n.data]);const O=o(!!((u=t.data)!=null&&u._parentVideo)&&a.videoClips(t.data._parentVideo.id)),F=o(t.statusCode===N.Forbidden&&a.clip(e.id,_.StripMetadata)),r=D({video:n.data,context:m,contextId:v,moviesAndTv:p,currentUser:i.data}),I=tt(),M=ot(),d=B(e.id,!0),T=et(),A=W({name:(l=t.data)==null?void 0:l.name});return k(z.getClipMetadata({content:t.data,phraseContext:{phraseHandler:at,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"}})),Y(t,st,{forbidden:!0}),C(r.videos??[]),K(F),X({id:e.id,app:"clips"}),t.data&&i.hasCompleted&&d.hasCompleted&&g?s.jsx(it,{clip:t.data,clips:(f=O.data)==null?void 0:f.data,interactives:(P=q.data)==null?void 0:P.data,currentUser:i.data,relatedVideos:m==="playlist"?r:{...r,videos:[]},hasProduct:V,queryParams:e.queryParams,audiences:I.data,canManageVideoAccess:y(Z.ManageVideoAccess),pointsOfInterest:d.items,featureAccess:T,tableOfContentsId:(h=e.queryParams)==null?void 0:h.tocId,shouldShowSideTableOfContents:M,breadcrumbs:A,commonVideoProps:b,hasTopicDirectories:x,hasTheatreMode:S}):s.jsx(s.Fragment,{})}export{mt as PlayClipView};
//# sourceMappingURL=CtW-wvlY.chunk.js.map
