var l = Object.defineProperty;
var r = (a, e, i) => e in a ? l(a, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[e] = i;
var t = (a, e, i) => r(a, typeof e != "symbol" ? e + "" : e, i);
import { ContentType as p } from "./index-Document.types.js";
class d {
  constructor() {
    /**
     * Checks if the validator can validate at least one of the given files.
     * @param files - The array of media item files to check.
     * @returns True if at least one file type matches an applicable file type, otherwise false.
     */
    t(this, "canValidateFiles", (e) => this.applicableFileTypes.includes(p.FILE_ANY) ? !0 : e.some((i) => this.applicableFileTypes.includes(i.fileType)));
    /**
     * Applies the validator to the given array of media item files.
     * If the validator cannot validate any of the files, it resolves with the original files.
     * @param files - The array of media item files to validate.
     * @returns A promise that resolves to an array of validated media item files or null if validation fails.
     */
    t(this, "applyValidator", (e) => this.canValidateFiles(e) ? this.validate(e) : new Promise((i) => {
      i(e);
    }));
  }
}
export {
  d as MediaItemValidator
};
