import{aI as O,ao as s,by as T,aq as m,aP as b,iF as E,f2 as N,du as _,v as g,f as i,e as o,a as f,bY as I,p as j,E as x,r as C,L as P}from"./app-k0jcl5PQ.js";import{P as R}from"./DwDhXSrj.chunk.js";import{S as A}from"./EHuWazu9.chunk.js";import{O as v}from"./BzSUSuAL.chunk.js";const y="_spinner_171ls_1",U="_heading_171ls_5",k="_description_171ls_13",d={spinner:y,heading:U,description:k},S="subjects.onboardingLoader";function G(e){return O.useEffect(()=>{window.setTimeout(e.onDone,2500)},[]),s.jsxs("div",{className:"d-flex flex-column align-items-center",children:[s.jsx("div",{className:"py-3",children:s.jsx(T,{as:"span",animation:"border",role:"status",className:d.spinner})}),s.jsx("h2",{className:d.heading,children:s.jsx(m,{namespace:S,phrase:"heading"})}),s.jsx("p",{className:`mb-0 pb-4 text-center ${d.description}`,children:s.jsx(m,{namespace:S,phrase:"info"})}),s.jsx("div",{className:"drop-shadow mb-n5",children:s.jsx("img",{src:b.Onboarding.LOADER,alt:"",role:"presentation",className:"img-fluid"})})]})}const B={...v,buildAppLink(e,a){const c=o.SUBJECT,p=(()=>{if(e==="welcome")return i.Subjects.ONBOARDING_WELCOME;if(e==="school-level")return i.Subjects.ONBOARDING_TOPIC_PRESENTATION;if(e==="curriculum")return i.Subjects.ONBOARDING_CURRICULUM_PRESENTATION})(),r={application:c,action:p};return a&&(r.params={redirectUrl:a}),r},redirect(e=""){const a={application:o.SUBJECT,action:i.Subjects.ONBOARDING};e&&(a.params={redirectUrl:e}),g.trigger(a,{replace:!0})},onCompleteOnboardingSuccess(e,a="/"){E.setItem("_onboardingComplete",e,2592e3);const c=()=>_.PageLoad(a);window.setTimeout(()=>{N.render(s.jsx(G,{onDone:c}),{size:"lg",dialogClassName:"rounded-3",hideButtons:!0,centered:!0,cancelButtonProps:{onClick:c}})},250)}},M="_pillTab_ncpvz_2",w={pillTab:M},H="settings.profileDetails",l=P.encloseNamespace(H);function z(e){var u;const a=(u=f.getCurrentRoute())==null?void 0:u.appLink,c=t=>t===(a==null?void 0:a.action),p=I.shouldShowAudiences(e.audiences),{hasManyCurriculumPresentations:r,hasAnySubjectPresentations:L}=B.hasManyPresentationTypes(e.availablePresentations),n={aboutMe:{appLink:{application:o.SETTINGS,action:i.Settings.ABOUT_ME_PROFILE}},schoolLevel:{appLink:{application:o.SETTINGS,action:i.Settings.SCHOOL_LEVEL_PROFILE},hide:!L},yearGroup:{appLink:{application:o.SETTINGS,action:i.Settings.YEAR_GROUP_PROFILE},hide:!p},curriculum:{appLink:{application:o.SETTINGS,action:i.Settings.CURRICULUM_PROFILE},hide:!r},subjects:{appLink:{application:o.SETTINGS,action:i.Settings.SUBJECT_PROFILE}}},h=Object.keys(n).map(t=>({name:l(t),appLink:n==null?void 0:n[t].appLink,active:c(n==null?void 0:n[t].appLink.action),analyticsData:{name:l(t),url:g.getHref(n==null?void 0:n[t].appLink)},analyticsOptions:{actionType:C.Click,entity:x.Url,location:j.MagicTabs},hide:n==null?void 0:n[t].hide}));return s.jsxs(A,{heading:l("heading"),breadcrumbs:[l("breadcrumb")],children:[s.jsx(R,{tabs:h,className:w.pillTab,enableSmallScreenSupport:!0}),e.children]})}export{B as O,z as P};
//# sourceMappingURL=Kb3MNbLP.chunk.js.map
