"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get SOURCE_DATA_WARNING_MESSAGE () {
        return SOURCE_DATA_WARNING_MESSAGE;
    },
    get VALIDATOR_TYPE () {
        return VALIDATOR_TYPE;
    },
    get intlTimeValidator () {
        return intlTimeValidator;
    },
    get sourceDataValidator () {
        return sourceDataValidator;
    }
});
const _dateTime = require("../../helpers/dateTime");
const _mixed = require("../../helpers/mixed");
const VALIDATOR_TYPE = 'intl-time';
const SOURCE_DATA_WARNING_MESSAGE = 'Source data warning ([itemsCount]). ' + 'Invalid value for "intl-time" cell type.\n\n' + '[affectedCells]\n\n' + 'Expected a value compatible with the 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS").';
function sourceDataValidator(value, cellMeta) {
    if (cellMeta.allowEmpty && (0, _mixed.isEmpty)(value)) {
        return true;
    }
    return (0, _dateTime.isValidTime)(value);
}
function intlTimeValidator(value, callback) {
    if (this.allowEmpty && (0, _mixed.isEmpty)(value)) {
        callback(true);
        return;
    }
    callback((0, _dateTime.isValidTime)(value));
}
intlTimeValidator.VALIDATOR_TYPE = VALIDATOR_TYPE;
