import { isPerformanceObserverAvailable } from './isPerformanceObserverAvailable';
var hasRequiredPerformanceAPIs;
export function isPerformanceAPIAvailable() {
  if (hasRequiredPerformanceAPIs === undefined) {
    hasRequiredPerformanceAPIs = typeof window !== 'undefined' && 'performance' in window && ['measure', 'clearMeasures', 'clearMarks', 'getEntriesByName', 'getEntriesByType', 'now'
    // Ignored via go/ees005
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    ].every(function (api) {
      return !!performance[api];
    });
  }
  return hasRequiredPerformanceAPIs;
}
export function isPerformanceObserverLongTaskAvailable() {
  return isPerformanceObserverAvailable() && PerformanceObserver.supportedEntryTypes && PerformanceObserver.supportedEntryTypes.includes('longtask');
}
// eslint-disable-next-line @atlaskit/editor/no-re-export
export { isPerformanceObserverAvailable } from './isPerformanceObserverAvailable';