import * as tslib_1 from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-react-core/ES5/type";
import { CustomContourValueResolverEventArgs } from "./igr-custom-contour-value-resolver-event-args";
import { IgrContourValueResolver } from "./igr-contour-value-resolver";
import { CustomContourValueResolver } from "./CustomContourValueResolver";
/**
 * ContourValueResolver class which fires an event to resolve the contour values.
*/
var IgrCustomContourValueResolver = /** @class */ (function (_super) {
    tslib_1.__extends(IgrCustomContourValueResolver, _super);
    function IgrCustomContourValueResolver(props) {
        var _this = _super.call(this, props) || this;
        _this._getCustomContourValues = null;
        _this._getCustomContourValues_wrapped = null;
        return _this;
    }
    IgrCustomContourValueResolver.prototype.createImplementation = function () {
        return new CustomContourValueResolver();
    };
    Object.defineProperty(IgrCustomContourValueResolver.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCustomContourValueResolver.prototype, "getCustomContourValues", {
        /**
         * Event raised when retrieving the contour values.
        */
        get: function () {
            return this._getCustomContourValues;
        },
        set: function (ev) {
            var _this = this;
            if (this._getCustomContourValues_wrapped !== null) {
                this.i.getCustomContourValues = delegateRemove(this.i.getCustomContourValues, this._getCustomContourValues_wrapped);
                this._getCustomContourValues_wrapped = null;
                this._getCustomContourValues = null;
            }
            this._getCustomContourValues = ev;
            this._getCustomContourValues_wrapped = function (o, e) {
                var outerArgs = new CustomContourValueResolverEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeGetCustomContourValues) {
                    _this.beforeGetCustomContourValues(_this, outerArgs);
                }
                if (_this._getCustomContourValues) {
                    _this._getCustomContourValues(_this, outerArgs);
                }
            };
            this.i.getCustomContourValues = delegateCombine(this.i.getCustomContourValues, this._getCustomContourValues_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    return IgrCustomContourValueResolver;
}(IgrContourValueResolver));
export { IgrCustomContourValueResolver };
