import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { ColorScaleInterpolationMode, ColorScaleInterpolationMode_$type } from "./ColorScaleInterpolationMode";
import { IgxColorScaleComponent } from "./igx-color-scale-component";
import { CustomPaletteColorScale } from "./CustomPaletteColorScale";
import { toColorCollection, fromColorCollection, ensureEnum } from "igniteui-angular-core/ES5/componentUtil";
/**
 * ColorScale class for selecting a color from a given palette, or interpolating between adjacent colors in that palette.
*/
export var IgxCustomPaletteColorScaleComponent_PROVIDERS = [{ provide: IgxColorScaleComponent, useExisting: forwardRef(function () { return IgxCustomPaletteColorScaleComponent; }) }];
var IgxCustomPaletteColorScaleComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxCustomPaletteColorScaleComponent, _super);
    function IgxCustomPaletteColorScaleComponent() {
        return _super.call(this) || this;
    }
    IgxCustomPaletteColorScaleComponent_1 = IgxCustomPaletteColorScaleComponent;
    IgxCustomPaletteColorScaleComponent.prototype.createImplementation = function () {
        return new CustomPaletteColorScale();
    };
    Object.defineProperty(IgxCustomPaletteColorScaleComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCustomPaletteColorScaleComponent.prototype, "minimumValue", {
        /**
         * The lowest value to assign a color.  Any given value less than this value will be made Transparent.
        */
        get: function () {
            return this.i.minimumValue;
        },
        set: function (v) {
            this.i.minimumValue = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCustomPaletteColorScaleComponent.prototype, "maximumValue", {
        /**
         * The highest value to assign a color.  Any given value greater than this value will be made Transparent.
        */
        get: function () {
            return this.i.maximumValue;
        },
        set: function (v) {
            this.i.maximumValue = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCustomPaletteColorScaleComponent.prototype, "palette", {
        /**
         * A list of colors to select from or interpolate between.
        */
        get: function () {
            return fromColorCollection(this.i.palette);
        },
        set: function (v) {
            this.i.palette = toColorCollection(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCustomPaletteColorScaleComponent.prototype, "interpolationMode", {
        /**
         * The approach to use when getting a color from the palette.
        */
        get: function () {
            return this.i.interpolationMode;
        },
        set: function (v) {
            this.i.interpolationMode = ensureEnum(ColorScaleInterpolationMode_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    IgxCustomPaletteColorScaleComponent.prototype.providePalette = function (colors) {
        this.i.providePalette(colors);
    };
    var IgxCustomPaletteColorScaleComponent_1;
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCustomPaletteColorScaleComponent.prototype, "minimumValue", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCustomPaletteColorScaleComponent.prototype, "maximumValue", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], IgxCustomPaletteColorScaleComponent.prototype, "palette", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCustomPaletteColorScaleComponent.prototype, "interpolationMode", null);
    IgxCustomPaletteColorScaleComponent = IgxCustomPaletteColorScaleComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-custom-palette-color-scale',
            template: "",
            providers: [{ provide: IgxColorScaleComponent, useExisting: forwardRef(function () { return IgxCustomPaletteColorScaleComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxCustomPaletteColorScaleComponent);
    return IgxCustomPaletteColorScaleComponent;
}(IgxColorScaleComponent));
export { IgxCustomPaletteColorScaleComponent };
//# sourceMappingURL=igx-custom-palette-color-scale-component.js.map