import{bg as o,bh as l,W as t,r as a,E as y,az as s,aj as f,aA as c,bu as m}from"./app-k0jcl5PQ.js";import{S as r}from"./D-iHOjjO.chunk.js";import{g as k}from"./9ZqmMPFe.chunk.js";function d(e){return"share"in e?!!e.share:!1}function S(e){return{"create-share-link":{isValid:d,analyticsOptions:{actionType:a.Create,workflowPhase:t.Complete,entity:y.ShareLink}},"update-share-link":{isValid:d,analyticsOptions:{actionType:a.Edit,entity:y.ShareLink,workflowPhase:t.Complete}},"delete-share-link":{isValid:d,analyticsOptions:{actionType:a.Delete,entity:y.ShareLink,workflowPhase:t.Complete}},"plugin-share-embed":{isValid:()=>!0,logBaseData:!1,analyticsOptions:{actionType:a.Share,descriptor:l.PluginEmbed,workflowPhase:t.Complete,entity:r.getAnalyticsEntity(e.data.entity.type),eventVersion:o.V5}},"copy-embed-html":{isValid:()=>!0,logBaseData:!1,analyticsOptions:{actionType:a.Share,workflowPhase:t.Complete,descriptor:l.CopyEmbedHtml,entity:r.getAnalyticsEntity(e.data.entity.type),eventVersion:o.V5}},"copy-share-link":{isValid:()=>!0,logBaseData:!1,analyticsOptions:{actionType:a.Share,workflowPhase:t.Complete,descriptor:l.CopyLink,entity:r.getAnalyticsEntity(e.data.entity.type),eventVersion:o.V5}}}}function E(e){const{log:i,getData:n}=k({analyticsOptions:e.analyticsOptions,baseData:e.data,config:S(e),shouldLog:e.shouldLog??!0});return{log:i,getData:n}}function D(e){var u;const i=s(f.currentUser()),n=r.getFetchFunctionByType(e.entityType)(e.entityId,(u=i.data)==null?void 0:u.id),h=s(c.getPrivacy(e.entityId)),g=s(e.shareId?c.getShare(e.shareId):c.getShareLink(e.entityId)),p=s(m.config());return{dataLoaded:!!n.data&&!!i.data&&!!h.data&&!!g.data&&!!p.data,currentUser:i,entity:n,privacy:h,share:g,config:p}}export{E as g,D as u};
//# sourceMappingURL=C8ys3yUG.chunk.js.map
