import{o as c,R as T,d$ as g,aV as R,S as o,dl as r,dk as x,j as i,fd as v,i as O,aR as U,aW as V,e0 as m}from"./app-BgLa5dit.js";import{E as q}from"./CPYC3VpT.chunk.js";import{C as M}from"./CaNT0eQn.chunk.js";import"./EsGKTtoq.chunk.js";import"./B-fq6xxv.chunk.js";function H(e){const{presentationId:C,classificationId:n,memberType:b}=e,j=c(U.currentUser()),[p,S]=T.useState(),[u,h]=T.useState();g(m.getPresentationFetchOptions(C,S),[]),g(m.getClassificationFetchOptions(n,h),[n]);const d=c(R.curationTags()),l=c(o.classificationMembers(e.classificationId,r.Tags)),f=x();function E(){var a;const t=[V.MOVIES_AND_TV];return(a=d.data)==null?void 0:a.filter(s=>!!t.includes(s.name))}function F(t,a,s){f(o.addObjectsToClassification(e.classificationId,[t.id],r.Tags,a,s))}function I(t,a,s){f(o.removeObjectsFromClassification(e.classificationId,[t.id],r.Tags,a,s))}return i.jsxs(i.Fragment,{children:[!!j.data&&i.jsx(q,{memberType:b,presentation:p,classificationId:n,getTabs:(t,a,s)=>v.getEditClassificationTabs(O.SUBJECTS,t,a,s)}),!!u&&!!d.data&&!!l.data&&i.jsx(M,{id:e.classificationId,heading:u.name,curationTags:E(),selectedCurationTags:l.data,addCurationTag:F,removeCurationTag:I})]})}export{H as EditClassificationCurationView};
//# sourceMappingURL=X8C0BEWo.chunk.js.map
