import { __extends } from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { ColorScaleInterpolationMode_$type } from "./ColorScaleInterpolationMode";
import { IgxColorScaleComponent } from "./igx-color-scale-component";
import { CustomPaletteColorScale } from "./CustomPaletteColorScale";
import { toColorCollection, fromColorCollection, ensureEnum } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * ColorScale class for selecting a color from a given palette, or interpolating between adjacent colors in that palette.
*/
var IgxCustomPaletteColorScaleComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxCustomPaletteColorScaleComponent, _super);
    function IgxCustomPaletteColorScaleComponent() {
        return _super.call(this) || this;
    }
    IgxCustomPaletteColorScaleComponent.prototype.createImplementation = function () {
        return new CustomPaletteColorScale();
    };
    Object.defineProperty(IgxCustomPaletteColorScaleComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        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: false,
        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: false,
        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: false,
        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: false,
        configurable: true
    });
    IgxCustomPaletteColorScaleComponent.prototype.providePalette = function (colors) {
        this.i.providePalette(colors);
    };
    IgxCustomPaletteColorScaleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCustomPaletteColorScaleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCustomPaletteColorScaleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxCustomPaletteColorScaleComponent, selector: "igx-custom-palette-color-scale", inputs: { minimumValue: "minimumValue", maximumValue: "maximumValue", palette: "palette", interpolationMode: "interpolationMode" }, providers: [{ provide: IgxColorScaleComponent, useExisting: forwardRef(function () { return IgxCustomPaletteColorScaleComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxCustomPaletteColorScaleComponent;
}(IgxColorScaleComponent));
export { IgxCustomPaletteColorScaleComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCustomPaletteColorScaleComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-custom-palette-color-scale',
                    template: "",
                    providers: [{ provide: IgxColorScaleComponent, useExisting: forwardRef(function () { return IgxCustomPaletteColorScaleComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { minimumValue: [{
                type: Input
            }], maximumValue: [{
                type: Input
            }], palette: [{
                type: Input
            }], interpolationMode: [{
                type: Input
            }] } });
