import * as React from "react";
import { flatten } from "../../utils/arrays.js";
function useMyValidationErrorMessages(bind, validationErrorMessages) {
  return React.useMemo(() => {
    var _a;
    return flatten(validationErrorMessages || [], ((_a = bind == null ? void 0 : bind.myValidationErrors) == null ? void 0 : _a.map((error) => error.message)) || []);
  }, [validationErrorMessages, bind == null ? void 0 : bind.myValidationErrors]);
}
export {
  useMyValidationErrorMessages
};
//# sourceMappingURL=validationErrors.hooks.js.map
