import{aG as R,aH as b,ao as t,aU as a,aP as L,aq as n,L as j,bN as T,p as y,aX as C,az as N,fu as h,aZ as V,ba as k,f as p,e as c,fp as E,c3 as v,cz as I,W as w,r as O}from"./app-k0jcl5PQ.js";import{P as D}from"./D9SGbB34.chunk.js";import{P as H,V as U,a as _}from"./DH1mz64H.chunk.js";import{R as G}from"./BpIVHcUT.chunk.js";import{u as M}from"./DDxzgH2W.chunk.js";import{R as q}from"./DzJMFLaU.chunk.js";import{S as F}from"./EHuWazu9.chunk.js";import"./BwBaQklX.chunk.js";import"./BlKMjFEf.chunk.js";import"./CofWDDSQ.chunk.js";import"./DwvfEevL.chunk.js";import"./ByBCp1MC.chunk.js";import"./BhYYYlpK.chunk.js";import"./FGhEvk_q.chunk.js";import"./WCBjpMHJ.chunk.js";import"./DoFMWlew.chunk.js";import"./CMnqIsoM.chunk.js";import"./eerUhItV.chunk.js";import"./Cukd0Qmt.chunk.js";import"./B31bqZwo.chunk.js";import"./uoUaCILN.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"./CIN5bTKK.chunk.js";import"./DwDhXSrj.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./ApI7cEru.chunk.js";import"./DXxHdeNz.chunk.js";import"./CpGXOT1_.chunk.js";import"./DkDkjje4.chunk.js";import"./hKqzfsO4.chunk.js";import"./fstW5ZQE.chunk.js";import"./9ls1F1Ve.chunk.js";import"./DRKUY7jf.chunk.js";const S="settings.videoRestrictions",z=j.encloseNamespace(S);function B(){const r=R.getLiteArticle(b.ContentReview);return t.jsxs(a,{children:[t.jsx(a.Image,{src:L.EmptyStates.ContentReview.RESTRICTED_VIDEOS}),t.jsx(a.Heading,{children:t.jsx(n,{namespace:S,phrase:"emptyHeading"})}),t.jsx(a.Cta,{href:r,text:z("emptyCta"),className:"btn btn-link info-link"})]})}const m="settings.videoRestrictions",o=j.encloseNamespace(m),Q={application:c.SETTINGS,action:p.Settings.CONTENT_PERMISSIONS};function It(r){var l,d,u,g,x;T({title:o("pageTitle")});const{commonVideoProps:f}=M({locationContext:y.VideoThumbnail}),{hasPermissions:A}=C(),i=N(G.getRestrictedObjects([h.User],r.cursor));function P(e,s){return[{order:1,label:o("manageVideoAccess"),button:!0,className:"btn btn-outline-dark text-nowrap",appLink:{application:c.DEFAULT,action:p.Default.MANAGE_ACCCESS,params:{objectId:e.id,objectTypeId:e.typeId}},analyticsOptions:{...s.analyticsOptions,actionType:O.SetAccess,workflowPhase:w.Start},analyticsData:s.analyticsData}]}return t.jsxs(F,{heading:o("heading"),breadcrumbs:[o("breadcrumb")],requiredPermissions:V.ManageVideoAccess,children:[t.jsx(q,{active:"restricted-videos"}),t.jsx("div",{className:"d-flex justify-content-between align-items-center",children:t.jsxs("p",{className:"mb-0",children:[t.jsx(n,{namespace:m,phrase:"description"})," ",t.jsx(k,{appLink:Q,className:"info-link",children:t.jsx(n,{namespace:m,phrase:"contentPermissions"})})]})}),t.jsx("hr",{}),!i.hasCompleted&&t.jsx(H,{}),i.hasCompleted&&!((d=(l=i.data)==null?void 0:l.data)!=null&&d.length)&&t.jsx(B,{}),!!((g=(u=i.data)==null?void 0:u.data)!=null&&g.length)&&t.jsxs(t.Fragment,{children:[t.jsx(U.Provider,{value:{getVideoActions:P},children:t.jsx(_,{videos:i.data.data.filter(e=>!!I.getRestrictionByType(e._restrictions,h.User)),getVideoAppLink:(e,s)=>v.getAppLink(e,s,null),hasPermissions:A,presentationAudiences:[],getPreviewQuestionsAppLink:e=>E.getPreviewQuestionsAppLink(e),commonVideoProps:f})}),((x=i.data.pagination)==null?void 0:x.cursors)&&t.jsx("div",{className:"clearfix",children:t.jsx(D,{cursors:i.data.pagination.cursors,appLink:{application:c.SETTINGS,action:p.Settings.VIDEO_RESTRICTIONS},buttonVariant:"outline-dark",className:"py-2 float-end"})})]})]})}export{It as VideoRestrictionsView};
//# sourceMappingURL=B27kXMSe.chunk.js.map
