import{c4 as C,bc as b,m as i,bw as s,dv as h,L as T,o as w,W as y,r as E,E as k,p as S,v as N,f as D,e as L}from"./app-k0jcl5PQ.js";import{I as P}from"./DTRakM4e.chunk.js";const R="shared.makeInteractive",U=T.encloseNamespace(R),M=c=>{const{feedback:o,setShowSpinner:t,objectId:p,name:a,duration:d,currentUser:l,closePopup:I,baseAnalyticsData:u}=c,n=C(),v=b();function r(){t(!1),v.error(U("error"))}function m(){t(!0);const e={name:a,duration:d,immediateFeedback:o,preventScrubbing:!1};i(n,s.createInteractive(e,f,r))}function f(e){const A={name:a,interactiveId:e.id,owner:{id:l.id},originType:P.Original,status:h.Draft};i(n,s.createInteractiveMetadata(p,A,g,r))}function g(e){w.logUserAction({...u,id:e.id,name:e.name},{location:S.NewInteractive,entity:k.Interactive,actionType:E.Create,workflowPhase:y.Complete}),N.trigger({application:L.INTERACTIVES,action:D.Interactives.EDIT_INTERACTIVE,args:[e.id,e.name]}),I()}return{createInteractive:m}};export{M as u};
//# sourceMappingURL=CLC2sKlT.chunk.js.map
