import{j as s,G as r,aw as d,di as m,f2 as u,az as S,ax as f,f7 as C,h as p,i as n,dj as I,ai as b,w as j}from"./app-BgLa5dit.js";const x=(e,i)=>a=>({application:i===b.Subject?n.SUBJECTS:n.CURRICULUMS,action:p.Subjects.EDIT_CLASSIFICATION,args:[e,a]});function h(e){const i=d(),a=m(i),t=c=>i.setFieldValue("classificationIds",j.addOrRemove(i.values.classificationIds.map(o=>o.toString()),c.id.toString())),l=`${u.getCustomFormControlClassName(i.errors,i.touched,"classificationIds")} h-auto py-2`;return s.jsxs(S,{children:[s.jsx(f,{name:"classificationIds",children:()=>s.jsx("div",{className:l,children:s.jsx(C,{label:"Mapped Topic(s)",tree:e.classificationTree,selectedIds:i.values.classificationIds,onSelect:t,getSelectedItemAppLink:x(e.presentationId,e.presentationType),isNodeDisabled:e.isClassificationDisabled,multiSelect:!0})})}),s.jsx("div",{className:"d-flex justify-content-end",children:s.jsx(I,{showSpinner:i.isSubmitting,type:"submit",disabled:!a,children:"Save Classifications"})})]})}function F(e){const i=({classificationIds:a},t)=>e.saveClassifications(a,t);return s.jsx(r,{initialValues:e.initialValues,onSubmit:i,enableReinitialize:!0,children:s.jsx(h,{presentationId:e.presentationId,classificationTree:e.classificationTree,presentationType:e.presentationType,isClassificationDisabled:e.isClassificationDisabled})})}export{F as S};
//# sourceMappingURL=B9ND9p3V.chunk.js.map
