import{d as e,az as l,aj as A,bu as v,bR as o,aX as T,aZ as U,dK as f,ay as O,p as P,dL as R}from"./app-k0jcl5PQ.js";var a=(s=>(s.SearchAndDiscover="searchAndDiscover",s.Analytics="analytics",s.OpenClassroom="openClassroom",s.CreateClassroom="createClassroom",s.UploadVideo="uploadVideo",s.Playlist="playlist",s.ShareVideo="shareVideo",s))(a||{});const C={analytics:e.HasDismissedAnalyticsTutorial,openClassroom:e.HasDismissedOpenClassroomsTutorial,searchAndDiscover:e.HasDismissedSearchAndDiscoverTutorial,createClassroom:e.HasDismissedClassroomsTutorial,playlist:e.HasDismissedPlaylistsTutorial,shareVideo:e.HasDismissedMySharesTutorial,uploadVideo:e.HasDismissedMyVideosTutorial};function k(s,V=!0){var g,D,S;const r=(g=l(A.currentUser()).data)==null?void 0:g.instanceRegion,d=l(v.config()),t=((D=d.data)!=null&&D.liteUrl.includes("staging")?o.TutorialVideoHighlight[s].staging:o.TutorialVideoHighlight[s].production)[r],c=(S=d.data)!=null&&S.liteUrl.includes("staging")?o.Tutorial.staging[r]:o.Tutorial.production[r],{hasPermissions:H}=T(),n=t!==void 0&&!H(U.StudentExperience),u=l(n&&f.sharedVideo(t.VIDEO,t.SHARE)),i=O(P.VideoHighlight);if(!V||!Object.keys(C).includes(s))return{shouldShowVideo:n,tutorialVideo:u,videoIds:t,playlistIds:c};const m={[a.Analytics]:i.hasDismissedAnalyticsTutorial,[a.OpenClassroom]:i.hasDismissedOpenClassroomsTutorial,[a.SearchAndDiscover]:i.hasDismissedSearchAndDiscoverTutorial,[a.CreateClassroom]:i.hasDismissedClassroomsTutorial,[a.Playlist]:i.hasDismissedPlaylistsTutorial,[a.ShareVideo]:i.hasDismissedMySharesTutorial,[a.UploadVideo]:i.hasDismissedMyVideosTutorial},h=C[s],p=async()=>{!Object.keys(m).includes(s)||!h||await i.updateUserSettingAsync({name:h,value:!0,kind:R.Setting})},y=m[s]??null;return{shouldShowVideo:n,tutorialVideo:u,videoIds:t,playlistIds:c,hasDismissedVideoHighlight:y,dismissVideoHighlight:p}}export{a as T,k as u};
//# sourceMappingURL=BpEsdmda.chunk.js.map
