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