import{aP as o,ao as a,aU as r,aq as A,am as N,E as V,p as M,r as T,f as d,e as l,L as g,aX as _,az as t,bu as q,aj as w,b4 as O,aA as $,aD as F,cu as W,bN as B,aZ as Y}from"./app-k0jcl5PQ.js";import{A as L}from"./B39N-_cE.chunk.js";import{I as n}from"./hCTjXXcY.chunk.js";import{u as z}from"./CgoG6iJ6.chunk.js";import{C as X}from"./_XP6hjk3.chunk.js";import{I as Z,a as J}from"./CTcVdunE.chunk.js";import{s as U,I as K}from"./Ch_Ay6KX.chunk.js";import{f as Q}from"./DnLUOQTx.chunk.js";import{g as aa}from"./CYSmAAb3.chunk.js";import"./wCY37Ze3.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./DwDhXSrj.chunk.js";import"./U4M4wGTR.chunk.js";import"./Bw9otuBi.chunk.js";import"./Bh7bFXwG.chunk.js";import"./BmaOJ2e9.chunk.js";import"./DCdUbbLx.chunk.js";import"./BHzuHk-6.chunk.js";import"./bYe0TMNu.chunk.js";import"./UBCV9Jq8.chunk.js";import"./Boh3c6zT.chunk.js";import"./BNfTlqwB.chunk.js";import"./D8qpyDLF.chunk.js";import"./q-a0Zpry.chunk.js";import"./BHfFK47N.chunk.js";import"./DlQIAsvN.chunk.js";import"./5Va-i3W_.chunk.js";import"./CnoMMtVD.chunk.js";import"./BzIt8QkE.chunk.js";import"./BEDdXV-K.chunk.js";import"./CssKhUy4.chunk.js";import"./Bcve7ust.chunk.js";import"./CG1PE8VW.chunk.js";import"./CNtKSILN.chunk.js";import"./uoUaCILN.chunk.js";import"./CX9BGBTP.chunk.js";import"./B31bqZwo.chunk.js";const m="shared.hardGateEmptyState",ta=g.encloseNamespace(m),sa={insights:{headingPhrase:"insightsHeading",descriptionPhrase:"insightsDescription",ctaPhrase:"insightsCta",imageUrl:o.HardGate.INTERACTIVE},"my-videos":{headingPhrase:"myVideosHeading",descriptionPhrase:"myVideosDescription",ctaPhrase:"myVideosCta",imageUrl:o.EmptyStates.MY_VIDEOS_PUBLIC},playlists:{headingPhrase:"playlistsHeading",descriptionPhrase:"playlistsDescription",ctaPhrase:"playlistsCta",imageUrl:o.EmptyStates.Playlists.PLAYLISTS_PUBLIC},clip:{headingPhrase:"clipHeading",descriptionPhrase:"clipDescription",ctaPhrase:"clipCta",imageUrl:o.HardGate.CLIP}};function ea(s){const e=sa[s.feature];return a.jsxs(r,{children:[a.jsx(r.Image,{src:e.imageUrl}),a.jsx(r.Heading,{children:a.jsx(A,{namespace:m,phrase:e.headingPhrase})}),a.jsxs(r.Info,{className:"w-75",children:[a.jsx(A,{namespace:m,phrase:e.descriptionPhrase})," "]}),a.jsx(r.Cta,{text:ta(e.ctaPhrase),appLink:s.appLink||{application:l.SIGN_UP,action:d.SignUp.PREMIUM_FEATURES},analyticsData:{},analyticsOptions:{actionType:T.Click,location:M.GatedEmptyState,entity:V.AppLink,descriptor:N.PremiumFeatures},className:"btn btn-dark mb-3"}),s.extraCta]})}const ia="insights.hardGateInsights",ra=g.encloseNamespace(ia);function na(s){return a.jsxs("div",{className:`${U.mask} position-relative`,children:[a.jsx("div",{className:"position-absolute ps-1",children:s.children}),a.jsx("div",{className:`${U.backdrop} d-flex flex-column align-items-center justify-content-start py-5`,children:a.jsx(ea,{feature:"insights",appLink:s.ctaAppLink,extraCta:a.jsx(r.Cta,{text:ra("viewData"),appLink:{application:l.MY_SHARES,action:d.MyShares.INTERACTIVE_OVERVIEW_DEMO},className:"btn btn-link text-info py-0"})})})]})}const oa="insights.hardGateInsights",ca=g.encloseNamespace(oa);function Ya(s){var v,C,E;z();const{hasPermissions:e}=_(),c=t(q.config()),h=t(w.currentUser()),j=t(h.data&&O.yearGroups(h.data.customerId)),i=t($.getShare(s.shareId)),u=F.getClassroomIdFromShare(i.data),k=t(u&&X.getClassroom(u)),R=i.data&&W.getVideoRequest(i.data.objectId,i.data.objectTypeId),p=t(R),I=t(n.interactiveMetadata()),P=t(n.interactive()),y=t(n.interactiveResults()),f=t(n.aggregateHeatmap()),S=t(n.videoViews()),D=L.getAudienceAppLinkParams(),H=L.getDateRangeAppLinkParams(),b={...D,...H},G=aa("",b),x=c.data&&I.data&&P.data&&y.data&&f.data&&!!S.data;return B({title:p.data?ca("pageTitle",{video:(v=p.data)==null?void 0:v.name}):null}),a.jsxs("div",{className:"px-3",children:[a.jsx(Z,{video:p.data,classroom:k.data,tabs:J(i.data,"insights"),hasSchoolAnalytics:e(Y.ViewSchoolAnalytics),analyticsWebUrl:(C=c.data)==null?void 0:C.analyticsWebUrl,share:i.data,yearGroups:j.data,hasData:!1,viewInsightsGatedPermission:"visible"}),x&&a.jsx(na,{ctaAppLink:{application:l.SIGN_UP,action:d.SignUp.UPGRADE},children:a.jsx(K,{aggregateEngagement:f.data,interactive:P.data,interactiveMetadata:I.data,classroomStudents:null,results:y.data,osCount:(E=S.data)==null?void 0:E.osCount,config:c.data,interactiveInsightsAppLinks:G,anonymiseUsers:!1,hasDataLoaded:x,share:Q})})]})}export{Ya as HardGateInsightsView};
//# sourceMappingURL=DiDC4KbA.chunk.js.map
