import{aT as o,aD as y,d_ as I,e0 as n,ai as P,o as A,D as B,d$ as m,y as N,j as c,fd as R,i as V,gr as M}from"./app-BgLa5dit.js";import{u as H}from"./D8tPNSYf.chunk.js";import{E as L}from"./CPYC3VpT.chunk.js";import{E as _}from"./CCD9OFWH.chunk.js";import{D as k}from"./BE59vaMU.chunk.js";import{E as q}from"./RFF3cwaz.chunk.js";import"./KIVqng-q.chunk.js";import"./BYVfdcaw.chunk.js";import"./DPqnN5u1.chunk.js";function X(T){var h,f;const{presentationId:a,classificationId:s}=T,[t,b]=o.useState(),[p,C]=o.useState(),[d,S]=o.useState(),[l,E]=o.useState(),j=y(I.SUBJECT),F=n.getClassificationFetchOptions(s,b),D=n.getPresentationFetchOptions(a,C),g=n.getClassificationTreeFetchOptions(a,S),v=n.getSubjectTreeFetchOptions(E,P.Subject),u=A(k.dashboards({targetType:B.Classification,classificationId:s},!0));m(v,[]),m(F,[s]),H([D,g],[a]);const x=(e,i)=>{const r={pinnedVideoMasterId:(t==null?void 0:t.pinnedVideoMasterId)||null,...e};return j.updateClassification(s,r,i,i)},O=(f=(h=u.data)==null?void 0:h.data)==null?void 0:f.some(e=>e.status===N.Published);return c.jsxs("div",{children:[c.jsx(L,{presentation:p,classificationId:s,getTabs:(e,i,r)=>R.getEditClassificationTabs(V.STREAMABLE_LEARNING,e,i,r)}),!!t&&!!d&&!!l&&u.hasCompleted&&c.jsx(_,{classification:t,saveClassification:x,validationSchema:M,children:c.jsx(q,{presentationId:a,presentationType:p.type,classificationTree:d,subjectTree:l,classification:t,hasPublishedDashboard:O})})]})}export{X as EditClassificationView};
//# sourceMappingURL=HzqDbNGH.chunk.js.map
