import{az as o,bu as E,be as h,aI as p,gS as P,ao as r,gT as g,gU as f,v as d,f as t,e as i}from"./app-k0jcl5PQ.js";import{E as I}from"./CaJ4Zmva.chunk.js";import{u as l}from"./BDd2EAdq.chunk.js";import"./CovOloHp.chunk.js";function C(e){const c=o(E.config()),a=o(h.getShareObject(e.shareId)),n=l(e.shareId);function u(){if(!a.data.isPasswordProtected&&!a.data.hasPincode)return;const s={application:i.EMBED,action:t.Embed.VIEW_EMBEDDED_RESOURCE,args:[e.shareId],params:d.getCurrentAppLink().params};d.trigger({application:i.LAUNCHPAD,action:a.data.isPasswordProtected?t.Launchpad.PASSWORD_PROTECTED_SHARE_LINK:t.Launchpad.VIDEO_PINCODE,args:[e.shareId],params:{appLink:s}})}function m(){if(a.data.isPasswordProtected||a.data.hasPincode){u();return}g.renderSignInPopup({shareId:e.shareId,customerId:e.customerId,consumerKey:e.consumerKey,onComplete:s=>f.applyToken(s==null?void 0:s.embedToken)})}return p.useLayoutEffect(()=>{P.remove()},[]),!c.data||!a.data||!n?r.jsx(r.Fragment,{}):r.jsx(I,{onClick:m,video:n})}export{C as EmbedLoginView};
//# sourceMappingURL=DAmp0Gr4.chunk.js.map
