import{bG as V,ay as G,bp as J,az as x,bu as K,bI as Q,bK as X,bs as Y,fa as Z,gz as w,fO as p,L as ee,bN as ae,bP as E,fP as te,fH as se,ao as e,bT as ne,fi as ie,ba as oe,p as re,r as ce,E as de,f as D,e as H,aq as b,b5 as le,gg as pe}from"./app-k0jcl5PQ.js";import{B as me,P as ge}from"./PHV_KuUR.chunk.js";import{P as ue,B as xe}from"./CCtuxSlD.chunk.js";import{c as be,C as he,a as Pe,S as Te}from"./Cs2oqmHD.chunk.js";import{P as fe}from"./BkQbc3uc.chunk.js";import"./BKsI6eJC.chunk.js";import"./DoGfHyrk.chunk.js";import"./CA48zo75.chunk.js";import"./BDviDDog.chunk.js";import"./wCY37Ze3.chunk.js";import"./CPXlV0fg.chunk.js";import"./DdN4NAtQ.chunk.js";import"./CBiwFpxE.chunk.js";import"./BcYgJJPz.chunk.js";import"./BlKMjFEf.chunk.js";import"./t2c-sXnZ.chunk.js";import"./BBUCoOir.chunk.js";import"./BrY2bcAL.chunk.js";import"./BHJbqrq4.chunk.js";import"./f_twTV5Z.chunk.js";const Ce=(P,r)=>n=>n!=null&&n.id?V.getAppLink(n,{},r):null,Le="_classificationPane_sns98_1",O={classificationPane:Le},m="subjects.presentationTopics",h=ee.encloseNamespace(m);function qe(P){var C,L,j,I,y,S,k,B,A;const{hasTopicDirectories:r}=G(null),n=J(),T=x(K.config()),{activePresentation:i}=Q(),{availablePresentations:s,hasCompleted:F,canAccessPresentation:W}=X(),R=Y(),g=Z(),u=P.presentationId||(i==null?void 0:i.id),t=x(u&&w.presentationById(u)),z=t.hasCompleted&&F,o={name:p.getExploreAllTopicsTitle((C=t.data)==null?void 0:C.name,s==null?void 0:s.length),banner:{url:p.getPresentationLevelImage((L=t.data)==null?void 0:L.learningLevel,"topic-banner")}},d=x(z&&w.topLevelTopics(u||((j=t.data)==null?void 0:j.id))),U=h("pageTitleSubject",{title:(I=t.data)==null?void 0:I.name});ae({title:U,description:h("pageDescription",{title:(y=t.data)==null?void 0:y.name}),canonicalLink:E.getCanonicalLink(),allowIndexing:E.allowIndexing()});const _=Ce(void 0,s);function q(){var a;return[{name:h("discover"),appLink:{application:H.DASHBOARD,action:D.Dashboard.HOME,args:[i==null?void 0:i.vanitySlug]}},{name:p.getExploreAllTopicsBreadcrumb((a=t.data)==null?void 0:a.name,s==null?void 0:s.length),active:!0}]}const l=!!T.data&&!!s&&d.data,f=W((S=t.data)==null?void 0:S.id),M={presentationId:(k=t.data)==null?void 0:k.id,presentationName:(B=t.data)==null?void 0:B.name,widgetId:se.Classifications,templateId:te.CoverFixedPillListLarge},$=r?be:he;return e.jsxs("main",{className:"bg-white px-4",children:[l?e.jsx(me,{heading:o==null?void 0:o.name,banner:o==null?void 0:o.banner,imageCdnUrl:T.data.imageCdnUrl,imageOptions:{size:ne.Large}}):e.jsx(ge,{}),e.jsx("div",{className:`py-3 mb-3 ${f?"border-bottom":""}`,children:f?l?e.jsx(xe,{breadcrumbs:q()}):e.jsx(ue,{}):e.jsx(e.Fragment,{})}),e.jsxs("div",{className:O.classificationPane,children:[l?e.jsx($,{id:(A=t.data)==null?void 0:A.id,name:"",description:"",analyticsData:M,content:d==null?void 0:d.data,appLinks:{classification:_},hasTableOfContents:!1,settings:{hasTopicDirectories:r},isTertiaryCustomerWithoutExchange:R&&!(g!=null&&g.hasProduct(ie.Exchange)),onToggleFollowClassification:()=>{}}):e.jsx(fe,{partialLoadingComponent:Pe}),l&&r&&(s==null?void 0:s.length)>1&&e.jsx("ul",{className:"pt-3 list-unstyled",children:s.filter(a=>{var c;return a.id!==((c=t.data)==null?void 0:c.id)}).map(a=>{var c,N,v;return e.jsx("li",{children:e.jsxs(oe,{className:`d-flex justify-content-between align-items-center text-white p-3 mb-3 rounded-3 ${O.link} ${p.getMappedPresentationBackgroundColourClass(a==null?void 0:a.learningLevel)}`,appLink:{application:H.SUBJECT,action:D.Subjects.PRESENTATION_TOPICS,args:[a.vanitySlug],params:{presentationId:a.id}},analyticsData:{id:a.id,name:a.name,description:a.description,currentPresentationId:(c=t.data)==null?void 0:c.id,currentPresentationName:(N=t.data)==null?void 0:N.name,currentPresentationDescription:(v=t.data)==null?void 0:v.description},analyticsOptions:{entity:de.Presentation,actionType:ce.Click,location:re.PresentationClassifications},children:[e.jsx("div",{className:"h4 text-shadow mb-0",children:s.length>2||n.sm||n.xs?e.jsx(b,{namespace:m,phrase:"multiPresentationBanner",options:{name:a.name}}):e.jsx(b,{namespace:m,phrase:"singlePresentationBanner",options:{name:a.name}})}),e.jsx(le,{svg:n.xs?Te:pe,openInNewTab:!0,className:"btn btn-outline-dark",onClick:null,children:e.jsx(b,{namespace:m,phrase:n.xs?"explore":"changeTo",options:{name:a.name}})})]})},a.id)})})]})]})}export{qe as PresentationTopicsView};
//# sourceMappingURL=B9tmdXh1.chunk.js.map
