import{ao as u,aF as v,L as o,aW as j,p as t,bU as r,az as b,i6 as y,ay as G,ij as H,ih as S,dK as R,f0 as w,M as E,o as d,jo as m,r as C,E as s,cu as n,v as p,T as g,f as h,e as V}from"./app-k0jcl5PQ.js";import{C as I}from"./BlyWclzH.chunk.js";import{b as M}from"./BWkfKZwD.chunk.js";const l="shared.videoGuidanceClassroomGuidePopup",x=350;function T(e){function a(i){return e.curriculums.updateCurriculum(i,{shouldLog:!0,video:e.video,locationContext:t.CurriculumGuidancePopup})}return u.jsx(v,{closePopup:e.onClickClose,showLoadingSpinner:e.isLoading,title:o.getPhrase(l,"curriculumLinks"),size:"lg",children:!e.isLoading&&u.jsxs(u.Fragment,{children:[u.jsxs(j,{autoHeightMax:x,autoHeightMin:x,autoHeight:!0,className:"pb-3",renderThumbVertical:({style:i,...c})=>u.jsx("div",{...c,style:{...i,borderRadius:"inherit",backgroundColor:"rgba(0, 0, 0, 0.2)",zIndex:5},className:"thumb-vertical"}),children:[u.jsx(I,{availableCurriculums:e.curriculums.availableCurriculums,onChangeCurriculum:a,selectedCurriculum:e.curriculums.preferredCurriculum}),u.jsx("div",{className:"pb-3",children:u.jsx(M,{curriculumLinks:e.curriculums.curriculumLinks,onChangeCurriculum:a,hasCompleted:e.curriculums.hasCompleted,mappedCurriculums:e.curriculums.mappedCurriculums,isFetching:e.curriculums.isFetching,getCodeAppLink:e.getCodeAppLink,locationContext:t.CurriculumGuidancePopup})})]}),u.jsxs(r,{children:[u.jsx(r.Cancel,{onClick:e.onClickClose,text:o.getPhrase(l,"close")}),u.jsx(r.Submit,{text:o.getPhrase(l,"viewVideo"),variant:"dark",onClick:e.onClickViewVideo})]})]})})}function F(e){function a(){return e.type===E.Video?R.video(e.id):w.clip(e.id)}const i=b(a()),c=y(e.id),{hasNewSearch:L}=G(null);function P(){d.logUserAction({id:i.data.id,name:i.data.name},{entity:n.isVideo(i.data)?s.Video:s.Clip,location:t.CurriculumGuidancePopup,actionType:C.Click,descriptor:m.Close}),e.closePopup()}function k(){if(d.logUserAction({id:i.data.id,name:i.data.name},{entity:n.isVideo(i.data)?s.Video:s.Clip,location:t.CurriculumGuidancePopup,actionType:C.Click,descriptor:m.ViewVideo}),n.isVideo(i.data)){p.trigger({application:V.VIDEOS,action:h.Videos.PLAY_VIDEO,args:[null,i.data.id,g.slugify(i.data.name)]}),e.closePopup();return}p.trigger({application:V.CLIPS,action:h.Clips.PLAY_CLIP,args:[i.data.id,g.slugify(i.data.name)]}),e.closePopup()}return u.jsx(T,{isLoading:!i.hasCompleted,video:i.data,curriculums:c,onClickClose:P,onClickViewVideo:k,closePopup:e.closePopup,getCodeAppLink:(A,f)=>L?H.getSearchAppLink(A,{[S]:f}):null})}export{F as VideoGuidanceClassroomGuideView};
//# sourceMappingURL=C6qPmNJT.chunk.js.map
