import { __extends } from "tslib";
import { EventEmitter, Output, Component, forwardRef, ChangeDetectionStrategy } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxCustomContourValueResolverEventArgs } from "./igx-custom-contour-value-resolver-event-args";
import { IgxContourValueResolverComponent } from "./igx-contour-value-resolver-component";
import { CustomContourValueResolver } from "./CustomContourValueResolver";
import * as i0 from "@angular/core";
/**
 * ContourValueResolver class which fires an event to resolve the contour values.
*/
var IgxCustomContourValueResolverComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxCustomContourValueResolverComponent, _super);
    function IgxCustomContourValueResolverComponent() {
        var _this = _super.call(this) || this;
        _this._getCustomContourValues = null;
        return _this;
    }
    IgxCustomContourValueResolverComponent.prototype.createImplementation = function () {
        return new CustomContourValueResolver();
    };
    Object.defineProperty(IgxCustomContourValueResolverComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        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 IgxCustomContourValueResolverEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeGetCustomContourValues) {
                            _this.beforeGetCustomContourValues(_this, outerArgs);
                        }
                        _this._getCustomContourValues.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._getCustomContourValues;
        },
        enumerable: false,
        configurable: true
    });
    IgxCustomContourValueResolverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCustomContourValueResolverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCustomContourValueResolverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxCustomContourValueResolverComponent, selector: "igx-custom-contour-value-resolver", outputs: { getCustomContourValues: "getCustomContourValues" }, providers: [{ provide: IgxContourValueResolverComponent, useExisting: forwardRef(function () { return IgxCustomContourValueResolverComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxCustomContourValueResolverComponent;
}(IgxContourValueResolverComponent));
export { IgxCustomContourValueResolverComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCustomContourValueResolverComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-custom-contour-value-resolver',
                    template: "",
                    providers: [{ provide: IgxContourValueResolverComponent, useExisting: forwardRef(function () { return IgxCustomContourValueResolverComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { getCustomContourValues: [{
                type: Output
            }] } });
