import * as tslib_1 from "tslib";
import { EventEmitter, Output } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core/ES2015/type";
import { PropertyUpdatedEventArgs } from "igniteui-angular-core/ES2015/igx-property-updated-event-args";
/**
 * Base class for classes which provide colors corresponding to numeric values within a known list of numeric values.
*/
export const IgxColorScaleComponent_PROVIDERS = [];
export class IgxColorScaleComponent {
    constructor() {
        this._propertyUpdated = null;
        this._zoneRunner = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    createImplementation() {
        return null;
    }
    ngOnInit() {
    }
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    /**
     * Event raised when a property (including "effective" and non-dependency property) value changes.
    */
    get propertyUpdated() {
        if (this._propertyUpdated == null) {
            this._propertyUpdated = new EventEmitter();
            this.i.propertyUpdated = delegateCombine(this.i.propertyUpdated, (o, e) => {
                this._runInZone(() => {
                    let outerArgs = new PropertyUpdatedEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforePropertyUpdated) {
                        this.beforePropertyUpdated(this, outerArgs);
                    }
                    this._propertyUpdated.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            });
        }
        return this._propertyUpdated;
    }
    _runInZone(act) {
        if (this._zoneRunner != null) {
            this._zoneRunner(act);
        }
        else {
            act();
        }
    }
}
tslib_1.__decorate([
    Output(),
    tslib_1.__metadata("design:type", EventEmitter),
    tslib_1.__metadata("design:paramtypes", [])
], IgxColorScaleComponent.prototype, "propertyUpdated", null);
//# sourceMappingURL=igx-color-scale-component.js.map