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