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.
*/
export let IgxCustomContourValueResolverComponent = /*@__PURE__*/ (() => {
    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 IgxCustomContourValueResolverEventArgs();
                        outerArgs._provideImplementation(e);
                        if (this.beforeGetCustomContourValues) {
                            this.beforeGetCustomContourValues(this, outerArgs);
                        }
                        this._getCustomContourValues.emit({
                            sender: this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._getCustomContourValues;
        }
    }
    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(() => IgxCustomContourValueResolverComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return 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(() => IgxCustomContourValueResolverComponent) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { getCustomContourValues: [{
                type: Output
            }] } });
