import{u as I,R as i,j as s,b7 as d,f7 as f,F as j,w as x,o as g,S as k,ai as S,ag as T}from"./app-BgLa5dit.js";import{W}from"./MEkA24R1.chunk.js";import{S as V}from"./DA_td-Zr.chunk.js";import{u as E}from"./CKjyFQLY.chunk.js";import{W as y,g as L,b as A,c as l}from"./BwfkiyJS.chunk.js";import"./B3eOBVf8.chunk.js";import"./3nM7jLnE.chunk.js";import"./CPXlV0fg.chunk.js";import"./DJ0pq8J_.chunk.js";import"./C53kfXmd.chunk.js";import"./CG7zbly5.chunk.js";const n="workbench.addToBackboneClassifications";function C(t){var r;const{workingList:o}=E(t.listId),[e,c]=I(t.viewModelKey),{setDisableNext:u}=i.useContext(W),m=a=>{const p=x.addOrRemove(e.assocIds.map(h=>h.toString()),a.id.toString());c("assocIds",p)};i.useEffect(()=>{var a;c("subAction","addToBackboneClassifications"),(a=e==null?void 0:e.assocIds)!=null&&a.length?c("assocIds",e.assocIds):c("assocIds",[])},[]),i.useEffect(()=>{var a;u(!((a=e==null?void 0:e.assocIds)!=null&&a.length))},[e==null?void 0:e.assocIds]);const b=!((r=e==null?void 0:e.assocIds)!=null&&r.length);return t.loaded?s.jsxs("div",{className:"pb-3",children:[s.jsx("h2",{className:"h4",children:s.jsx(d,{namespace:n,phrase:"heading"})}),s.jsx("p",{className:"fw-semibold",children:s.jsx(d,{namespace:n,phrase:"contextVideo",options:{smartCount:o==null?void 0:o.length}})}),s.jsx("div",{className:"form-control h-auto py-2",children:s.jsx(f,{label:j.getPhrase(n,"treeTitle"),tree:t.subjectTree,selectedIds:e==null?void 0:e.assocIds,hideCollapseBtn:b,onSelect:m,getSelectedItemAppLink:y.getBackboneClassificationAppLink,openSelectionsInNewTab:!0,multiSelect:!0})})]}):s.jsx(V,{})}function Y(t){const o=L(t.listId),e=g(k.getSubjectTree(S.Subject));return s.jsx(A,{listId:t.listId,appLinks:o,currentStep:"action-details",viewModelKey:l.VIDEO_VIEW_MODEL_KEY,type:T.Video,loaded:!!e.data,children:s.jsx(C,{appLinks:o,listId:t.listId,viewModelKey:l.VIDEO_VIEW_MODEL_KEY,subjectTree:e.data,loaded:!!e.data})})}export{Y as WorkbenchVideoActionsAddToBackboneClassificationsDetailsView};
//# sourceMappingURL=C7-NbsOW.chunk.js.map
