import * as tslib_1 from "tslib";
import { ColorScaleInterpolationMode_$type } from "./ColorScaleInterpolationMode";
import { IgrColorScale } from "./igr-color-scale";
import { CustomPaletteColorScale } from "./CustomPaletteColorScale";
import { toColorCollection, fromColorCollection, ensureEnum } from "igniteui-react-core/ES5/componentUtil";
/**
 * ColorScale class for selecting a color from a given palette, or interpolating between adjacent colors in that palette.
*/
var IgrCustomPaletteColorScale = /** @class */ (function (_super) {
    tslib_1.__extends(IgrCustomPaletteColorScale, _super);
    function IgrCustomPaletteColorScale(props) {
        return _super.call(this, props) || this;
    }
    IgrCustomPaletteColorScale.prototype.createImplementation = function () {
        return new CustomPaletteColorScale();
    };
    Object.defineProperty(IgrCustomPaletteColorScale.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCustomPaletteColorScale.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(IgrCustomPaletteColorScale.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(IgrCustomPaletteColorScale.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(IgrCustomPaletteColorScale.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
    });
    IgrCustomPaletteColorScale.prototype.providePalette = function (colors) {
        this.i.providePalette(colors);
    };
    return IgrCustomPaletteColorScale;
}(IgrColorScale));
export { IgrCustomPaletteColorScale };
