import { delegateCombine, delegateRemove } from "igniteui-react-core/ES2015/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.
*/
export class IgrCustomContourValueResolver extends IgrContourValueResolver {
    constructor(props) {
        super(props);
        this._getCustomContourValues = null;
        this._getCustomContourValues_wrapped = null;
    }
    createImplementation() {
        return new CustomContourValueResolver();
    }
    get i() {
        return this._implementation;
    }
    /**
     * Event raised when retrieving the contour values.
    */
    get getCustomContourValues() {
        return this._getCustomContourValues;
    }
    set getCustomContourValues(ev) {
        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 = (o, e) => {
            let 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);
    }
}
