export function findUnmatchedRequestedFiles(
  configs,
  typeValues,
  suiteSelectors,
  fileNames,
  collectSuites,
  normalizePathSeparators
) {
  const matchedFiles = new Set();
  for (const config of configs) {
    const suites = collectSuites(config, typeValues, suiteSelectors, [], {
      ignoreSkipRules: true,
    });
    for (const suite of suites) {
      for (const file of suite.files) {
        matchedFiles.add(normalizePathSeparators(file));
      }
    }
  }

  return [...new Set(fileNames.map(normalizePathSeparators))].filter(
    (file) => !matchedFiles.has(file)
  );
}

export function isFullRunSelection(typeValues, suiteSelectors, fileNames, shard, serviceFilter) {
  return (
    (typeValues || []).length === 1 &&
    typeValues[0] === "all" &&
    (suiteSelectors || []).length === 0 &&
    (fileNames || []).length === 0 &&
    (shard || null) === null &&
    (serviceFilter || null) === null
  );
}
