var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
var __spread = (this && this.__spread) || function () {
    for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
    return ar;
};
import { Inject, Pipe } from '@angular/core';
import { NT_VALIDATION_TRANSFOMER } from './form-validation';
var NtFormErrorPipe = (function () {
    function NtFormErrorPipe(_transformer) {
        this._transformer = _transformer;
    }
    NtFormErrorPipe.prototype.transform = function (value) {
        var _a;
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            args[_i - 1] = arguments[_i];
        }
        return (_a = this._transformer).transform.apply(_a, __spread([value], args));
    };
    NtFormErrorPipe.ctorParameters = function () { return [
        { type: undefined, decorators: [{ type: Inject, args: [NT_VALIDATION_TRANSFOMER,] }] }
    ]; };
    NtFormErrorPipe = __decorate([
        Pipe({ name: 'formError' }),
        __param(0, Inject(NT_VALIDATION_TRANSFOMER))
    ], NtFormErrorPipe);
    return NtFormErrorPipe;
}());
export { NtFormErrorPipe };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJz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