export const getEstimatedResultSizes = (startDate, endDate, predictedGranulesPerDay, predictedFileSize, computedFileSize) => {
  // quick validation to ensure we have the data needed to estimate the sizes
  if (!startDate || !endDate || !predictedGranulesPerDay || !computedFileSize) {
    return null;
  }
  let oneDay = 24 * 60 * 60 * 1000; // hours * minutes * seconds * milliseconds
  let start = new Date(startDate);
  let end = new Date(endDate);
  // compute an estimate for each
  let estimatedDays = Math.ceil(Math.abs((start.getTime() - end.getTime()) / oneDay));
  let estimatedLinks = Math.ceil(predictedGranulesPerDay * estimatedDays);
  let estimatedFileSize = Math.ceil((computedFileSize || predictedFileSize) * estimatedLinks);
  return {
    days: estimatedDays,
    links: estimatedLinks,
    fileSize: estimatedFileSize,
  };
};
