import * as tslib_1 from "tslib";
var IgxCustomContourValueResolverComponent_1;
import { EventEmitter, Output, Component, forwardRef, ChangeDetectionStrategy } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core/ES2015/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 const IgxCustomContourValueResolverComponent_PROVIDERS = [{ provide: IgxContourValueResolverComponent, useExisting: forwardRef(() => IgxCustomContourValueResolverComponent) }];
let IgxCustomContourValueResolverComponent = IgxCustomContourValueResolverComponent_1 = class IgxCustomContourValueResolverComponent extends IgxContourValueResolverComponent {
    constructor() {
        super();
        this._getCustomContourValues = null;
    }
    createImplementation() {
        return new CustomContourValueResolver();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Event raised when retrieving the contour values.
    */
    get getCustomContourValues() {
        if (this._getCustomContourValues == null) {
            this._getCustomContourValues = new EventEmitter();
            this.i.getCustomContourValues = delegateCombine(this.i.getCustomContourValues, (o, e) => {
                this._runInZone(() => {
                    let outerArgs = new CustomContourValueResolverEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforeGetCustomContourValues) {
                        this.beforeGetCustomContourValues(this, outerArgs);
                    }
                    this._getCustomContourValues.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            });
        }
        return this._getCustomContourValues;
    }
};
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(() => IgxCustomContourValueResolverComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush
    }),
    tslib_1.__metadata("design:paramtypes", [])
], IgxCustomContourValueResolverComponent);
export { IgxCustomContourValueResolverComponent };
//# sourceMappingURL=igx-custom-contour-value-resolver-component.js.map