// #region Imports
import { ElementValidatorBase } from './Abstracts/ElementValidatorBase';
import { isBlankValue as _isBlankValue, blankValidator } from './BlankElementValidatorFn';
/**
 * @public
 */
export class BlankElementValidator extends ElementValidatorBase {
    // #region Ctor
    constructor(host, messageResolver) {
        super(host, messageResolver ?? ((_params) => 'The value is blank.'));
    }
    // #endregion
    // #region Properties
    get attributes() {
        return ['value'];
    }
    // #endregion
    // #region Methods
    validate() {
        const errors = blankValidator(this.host);
        return this.getMessage(errors);
    }
}
(function (BlankElementValidator) {
    BlankElementValidator.isBlankValue = _isBlankValue;
})(BlankElementValidator || (BlankElementValidator = {}));
/**
 * A factory function for the `BlankElementValidator`.
 *
 * @public
 * @param resolver - A *optional* message resolver to get the error message that will be displayed. When not provided, a default message will be used.
 */
export function blankElementValidator(messageResolver) {
    return (host) => {
        return new BlankElementValidator(host, messageResolver);
    };
}
//# sourceMappingURL=BlankElementValidator.js.map