import{H as i,aI as r,az as s,bu as c,o as l,W as u,E as f,p,r as w,ao as k}from"./app-k0jcl5PQ.js";import{D as y}from"./Q_WQ5xs9.chunk.js";const m={createDownloadToken(o){return{url:"/api/downloadproxy/api/tokens",key:`download:token:${o}`,data:{objectId:o},type:i.POST,normalize:!1}}};function T(o){const e=r.useRef(null),a=s(c.config()),t=s(m.createDownloadToken(o.id)),n=!!a.data&&!!t.data;return r.useEffect(()=>{if(!n||!e.current)return;const d=y.getVideoDownloadUrl(a.data.downloadProxy,t.data.token);e.current.src=d,l.logUserAction({id:o.id},{actionType:w.Download,location:p.Popup,entity:f.Video,workflowPhase:u.Complete})},[n,e.current]),k.jsx("iframe",{ref:e})}export{T as DownloadVideoView};
//# sourceMappingURL=D4Piroa6.chunk.js.map
