import * as tslib_1 from "tslib";
import { EventEmitter, Output, Component, forwardRef, ChangeDetectionStrategy } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core/ES5/type";
import { CustomContourValueResolverEventArgs } from "./igx-custom-contour-value-resolver-event-args";
import { IgxContourValueResolverComponent } from "./igx-contour-value-resolver-component";
import { CustomContourValueResolver } from "./CustomContourValueResolver";
/**
 * ContourValueResolver class which fires an event to resolve the contour values.
*/
export var IgxCustomContourValueResolverComponent_PROVIDERS = [{ provide: IgxContourValueResolverComponent, useExisting: forwardRef(function () { return IgxCustomContourValueResolverComponent; }) }];
var IgxCustomContourValueResolverComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxCustomContourValueResolverComponent, _super);
    function IgxCustomContourValueResolverComponent() {
        var _this = _super.call(this) || this;
        _this._getCustomContourValues = null;
        return _this;
    }
    IgxCustomContourValueResolverComponent_1 = IgxCustomContourValueResolverComponent;
    IgxCustomContourValueResolverComponent.prototype.createImplementation = function () {
        return new CustomContourValueResolver();
    };
    Object.defineProperty(IgxCustomContourValueResolverComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCustomContourValueResolverComponent.prototype, "getCustomContourValues", {
        /**
         * Event raised when retrieving the contour values.
        */
        get: function () {
            var _this = this;
            if (this._getCustomContourValues == null) {
                this._getCustomContourValues = new EventEmitter();
                this.i.getCustomContourValues = delegateCombine(this.i.getCustomContourValues, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new CustomContourValueResolverEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeGetCustomContourValues) {
                            _this.beforeGetCustomContourValues(_this, outerArgs);
                        }
                        _this._getCustomContourValues.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._getCustomContourValues;
        },
        enumerable: true,
        configurable: true
    });
    var IgxCustomContourValueResolverComponent_1;
    tslib_1.__decorate([
        Output(),
        tslib_1.__metadata("design:type", EventEmitter),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxCustomContourValueResolverComponent.prototype, "getCustomContourValues", null);
    IgxCustomContourValueResolverComponent = IgxCustomContourValueResolverComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-custom-contour-value-resolver',
            template: "",
            providers: [{ provide: IgxContourValueResolverComponent, useExisting: forwardRef(function () { return IgxCustomContourValueResolverComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxCustomContourValueResolverComponent);
    return IgxCustomContourValueResolverComponent;
}(IgxContourValueResolverComponent));
export { IgxCustomContourValueResolverComponent };
//# sourceMappingURL=igx-custom-contour-value-resolver-component.js.map