import * as tslib_1 from "tslib";
import { EditorType_$type } from "./EditorType";
import { IgcColumnComponent } from "./igc-column-component";
import { NumericColumn } from "./NumericColumn";
import { getAllPropertyNames, toSpinal, ensureBool, ensureEnum, enumToString, arrayFindByName } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
 * Represents a Numeric grid column, used to allow the developer to display a formatted number in a cell.
*/
var IgcNumericColumnComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgcNumericColumnComponent, _super);
    function IgcNumericColumnComponent() {
        return _super.call(this) || this;
    }
    IgcNumericColumnComponent.prototype.createImplementation = function () {
        return new NumericColumn();
    };
    Object.defineProperty(IgcNumericColumnComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcNumericColumnComponent.prototype.connectedCallback = function () {
        if (_super.prototype["connectedCallback"]) {
            _super.prototype["connectedCallback"].call(this);
        }
        if (!this._attached) {
            this._attached = true;
            this._flushQueuedAttributes();
        }
    };
    Object.defineProperty(IgcNumericColumnComponent, "observedAttributes", {
        get: function () {
            if (IgcNumericColumnComponent._observedAttributesIgcNumericColumnComponent == null) {
                var names = getAllPropertyNames(IgcNumericColumnComponent);
                for (var i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcNumericColumnComponent._observedAttributesIgcNumericColumnComponent = names;
            }
            return IgcNumericColumnComponent._observedAttributesIgcNumericColumnComponent;
        },
        enumerable: true,
        configurable: true
    });
    IgcNumericColumnComponent.register = function () {
        if (!IgcNumericColumnComponent._isElementRegistered) {
            IgcNumericColumnComponent._isElementRegistered = true;
            RegisterElementHelper.registerElement(IgcNumericColumnComponent.htmlTagName, IgcNumericColumnComponent);
        }
    };
    Object.defineProperty(IgcNumericColumnComponent.prototype, "negativePrefix", {
        /**
         * Gets or sets the string to prefix a negative value. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.kv;
        },
        set: function (v) {
            this.i.kv = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "positivePrefix", {
        /**
         * Gets or sets the string to prefix a positive value. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.kz;
        },
        set: function (v) {
            this.i.kz = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "negativeSuffix", {
        /**
         * Gets or sets the string to suffix a negative value. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.kx;
        },
        set: function (v) {
            this.i.kx = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "positiveSuffix", {
        /**
         * Gets or sets the string to suffix a positive value. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.k1;
        },
        set: function (v) {
            this.i.k1 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "maxFractionDigits", {
        /**
         * Gets or sets the maximum fraction digits. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.kc;
        },
        set: function (v) {
            this.i.kc = +v;
            this._a("maxFractionDigits", this.i.kc);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "minFractionDigits", {
        /**
         * Gets or sets the minimum fraction digits. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.kd;
        },
        set: function (v) {
            this.i.kd = +v;
            this._a("minFractionDigits", this.i.kd);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "minIntegerDigits", {
        /**
         * Gets or sets the minimum integer digits. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.ke;
        },
        set: function (v) {
            this.i.ke = +v;
            this._a("minIntegerDigits", this.i.ke);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "showGroupingSeparator", {
        /**
         * Gets or sets whether to show a grouping separator. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.j7;
        },
        set: function (v) {
            this.i.j7 = ensureBool(v);
            this._a("showGroupingSeparator", this.i.j7);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "formatString", {
        /**
         * Gets or sets the format string to apply to the value. If set, the other value formatting properties on this column are ignored.
        */
        get: function () {
            return this.i.kq;
        },
        set: function (v) {
            this.i.kq = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "formatSpecifiers", {
        get: function () {
            return this.i.j4;
        },
        set: function (v) {
            this.i.j4 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "formatOverride", {
        /**
         * Gets or sets the INTL NumericFormat object to use for formatting the date values.
        */
        get: function () {
            return this.i.kh;
        },
        set: function (v) {
            this.i.kh = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "editorType", {
        /**
         * Gets or sets the editor type used for editing cells in this column.
        */
        get: function () {
            return this.i.j5;
        },
        set: function (v) {
            this.i.j5 = ensureEnum(EditorType_$type, v);
            this._a("editorType", enumToString(EditorType_$type, this.i.j5));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "editorDataSource", {
        /**
         * Gets or sets the ComboBox data source.
        */
        get: function () {
            return this.i.kg;
        },
        set: function (v) {
            this.i.kg = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "editorTextField", {
        /**
         * Gets or sets the ComboBox text field.
        */
        get: function () {
            return this.i.kn;
        },
        set: function (v) {
            this.i.kn = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcNumericColumnComponent.prototype, "editorValueField", {
        /**
         * Gets or sets the ComboBox value field.
        */
        get: function () {
            return this.i.j3;
        },
        set: function (v) {
            this.i.j3 = v;
        },
        enumerable: true,
        configurable: true
    });
    IgcNumericColumnComponent.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.formatSpecifiers != null && arrayFindByName(this.formatSpecifiers, name)) {
            return arrayFindByName(this.formatSpecifiers, name);
        }
        return null;
    };
    IgcNumericColumnComponent._observedAttributesIgcNumericColumnComponent = null;
    IgcNumericColumnComponent.htmlTagName = "igc-numeric-column";
    IgcNumericColumnComponent._isElementRegistered = false;
    return IgcNumericColumnComponent;
}(IgcColumnComponent));
export { IgcNumericColumnComponent };
//# sourceMappingURL=igc-numeric-column-component.js.map
