import { fg } from '@atlaskit/platform-feature-flags';
export const createLoadSucceededEvent = ({
  fileId,
  fileMediatype,
  fileMimetype,
  fileSize
}, traceContext) => {
  return {
    eventType: 'operational',
    actionSubject: 'mediaFile',
    action: 'loadSucceeded',
    attributes: {
      status: 'success',
      fileMediatype,
      fileMimetype,
      fileAttributes: {
        fileId,
        fileMediatype,
        fileMimetype,
        fileSize
      },
      traceContext: fileMediatype === 'image' ? traceContext : undefined,
      featureFlags: {
        media_document_viewer: fg('media_document_viewer')
      }
    }
  };
};