import{u as p,j as e,bA as x,b7 as c,f7 as I,F as E,ag as m,o as d,S as L,ai as V,aP as v,aR as w,aQ as y,g as T}from"./app-BgLa5dit.js";import{W as A}from"./D8ca7W7r.chunk.js";import{W as o,a as M,g as S,b as _,c as l}from"./BwfkiyJS.chunk.js";import{W as B}from"./CPx1XrU-.chunk.js";import{W as N}from"./CnYYY4AA.chunk.js";import{u as D}from"./CKjyFQLY.chunk.js";import"./B3eOBVf8.chunk.js";import"./3nM7jLnE.chunk.js";import"./CPXlV0fg.chunk.js";import"./MEkA24R1.chunk.js";import"./DJ0pq8J_.chunk.js";import"./C53kfXmd.chunk.js";import"./CG7zbly5.chunk.js";const b="workbench.addToBackboneClassificationsConfirmation",K={[m.Video]:"videoChanges"};function R(t){const[a]=p(t.viewModelKey);return o.useSetWorkbenchConfirmationCallback(t.onConfirmClick,t.viewModelKey),e.jsxs(x.Provider,{value:b,children:[e.jsx("h2",{className:"h4",children:e.jsx(c,{phrase:"heading"})}),e.jsxs("div",{className:"mb-3",children:[e.jsx("h3",{className:"h6",children:e.jsx(c,{phrase:"description"})}),e.jsx("div",{className:"form-control h-auto py-2",children:e.jsx(I,{label:E.getPhrase(b,"treeLabel"),tree:t.subjectTree,selectedIds:a==null?void 0:a.assocIds,getSelectedItemAppLink:o.getBackboneClassificationAppLink,collapse:!0,hideCollapseBtn:!0,openSelectionsInNewTab:!0})})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("h3",{className:"h6 mt-2",children:e.jsx(c,{phrase:K[t.type],options:{smartCount:t.objects.length}})}),e.jsx(A,{items:t.objects,rowHeight:M,getComponent:i=>o.getItemComponent(i,t.type)})]})]})}function $(t){const a=d(w.currentUser()),{workingList:i}=D(t.listId),[h]=p(l.VIDEO_VIEW_MODEL_KEY),s=d(L.getSubjectTree(V.Subject)),C=v(),n=S(t.listId),u=d(N.videosById(i)),f=!!(s.hasCompleted&&(s!=null&&s.data)),g=o.useCreateJobErrorAlert();function k(r){T.trigger({...n.wizardActionStatus.polling,params:{jobId:r.id}})}function j(){if(!h)return;const r=o.getCreateJobRequestData(h,i,a.data.id);y(C,B.createJob(r,k,g))}const W=!!a.data&&!!u.data;return e.jsx(_,{listId:t.listId,appLinks:n,currentStep:"confirmation",viewModelKey:l.VIDEO_VIEW_MODEL_KEY,type:m.Video,loaded:W,children:e.jsx(R,{type:m.Video,objects:u.data,appLinks:n,viewModelKey:l.VIDEO_VIEW_MODEL_KEY,subjectTree:s==null?void 0:s.data,loaded:f,onConfirmClick:j})})}export{$ as WorkbenchVideoAddToBackboneClassificationsConfirmationView};
//# sourceMappingURL=qH04newB.chunk.js.map
