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.
*/
export let IgcNumericColumnComponent = /*@__PURE__*/ (() => {
    class IgcNumericColumnComponent extends IgcColumnComponent {
        constructor() {
            super();
        }
        createImplementation() {
            return new NumericColumn();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        connectedCallback() {
            if (super["connectedCallback"]) {
                super["connectedCallback"]();
            }
            if (!this._attached) {
                this._attached = true;
                this._flushQueuedAttributes();
            }
        }
        static get observedAttributes() {
            if (IgcNumericColumnComponent._observedAttributesIgcNumericColumnComponent == null) {
                let names = getAllPropertyNames(IgcNumericColumnComponent);
                for (let i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcNumericColumnComponent._observedAttributesIgcNumericColumnComponent = names;
            }
            return IgcNumericColumnComponent._observedAttributesIgcNumericColumnComponent;
        }
        static register() {
            if (!IgcNumericColumnComponent._isElementRegistered) {
                IgcNumericColumnComponent._isElementRegistered = true;
                RegisterElementHelper.registerElement(IgcNumericColumnComponent.htmlTagName, IgcNumericColumnComponent);
            }
        }
        /**
         * Gets or sets the string to prefix a negative value. If FormatString is specificied this value is ignored.
        */
        get negativePrefix() {
            return this.i.kv;
        }
        set negativePrefix(v) {
            this.i.kv = v;
        }
        /**
         * Gets or sets the string to prefix a positive value. If FormatString is specificied this value is ignored.
        */
        get positivePrefix() {
            return this.i.kz;
        }
        set positivePrefix(v) {
            this.i.kz = v;
        }
        /**
         * Gets or sets the string to suffix a negative value. If FormatString is specificied this value is ignored.
        */
        get negativeSuffix() {
            return this.i.kx;
        }
        set negativeSuffix(v) {
            this.i.kx = v;
        }
        /**
         * Gets or sets the string to suffix a positive value. If FormatString is specificied this value is ignored.
        */
        get positiveSuffix() {
            return this.i.k1;
        }
        set positiveSuffix(v) {
            this.i.k1 = v;
        }
        /**
         * Gets or sets the maximum fraction digits. If FormatString is specificied this value is ignored.
        */
        get maxFractionDigits() {
            return this.i.kc;
        }
        set maxFractionDigits(v) {
            this.i.kc = +v;
            this._a("maxFractionDigits", this.i.kc);
        }
        /**
         * Gets or sets the minimum fraction digits. If FormatString is specificied this value is ignored.
        */
        get minFractionDigits() {
            return this.i.kd;
        }
        set minFractionDigits(v) {
            this.i.kd = +v;
            this._a("minFractionDigits", this.i.kd);
        }
        /**
         * Gets or sets the minimum integer digits. If FormatString is specificied this value is ignored.
        */
        get minIntegerDigits() {
            return this.i.ke;
        }
        set minIntegerDigits(v) {
            this.i.ke = +v;
            this._a("minIntegerDigits", this.i.ke);
        }
        /**
         * Gets or sets whether to show a grouping separator. If FormatString is specificied this value is ignored.
        */
        get showGroupingSeparator() {
            return this.i.j7;
        }
        set showGroupingSeparator(v) {
            this.i.j7 = ensureBool(v);
            this._a("showGroupingSeparator", this.i.j7);
        }
        /**
         * Gets or sets the format string to apply to the value. If set, the other value formatting properties on this column are ignored.
        */
        get formatString() {
            return this.i.kq;
        }
        set formatString(v) {
            this.i.kq = v;
        }
        get formatSpecifiers() {
            return this.i.j4;
        }
        set formatSpecifiers(v) {
            this.i.j4 = v;
        }
        /**
         * Gets or sets the INTL NumericFormat object to use for formatting the date values.
        */
        get formatOverride() {
            return this.i.kh;
        }
        set formatOverride(v) {
            this.i.kh = v;
        }
        /**
         * Gets or sets the editor type used for editing cells in this column.
        */
        get editorType() {
            return this.i.j5;
        }
        set editorType(v) {
            this.i.j5 = ensureEnum(EditorType_$type, v);
            this._a("editorType", enumToString(EditorType_$type, this.i.j5));
        }
        /**
         * Gets or sets the ComboBox data source.
        */
        get editorDataSource() {
            return this.i.kg;
        }
        set editorDataSource(v) {
            this.i.kg = v;
        }
        /**
         * Gets or sets the ComboBox text field.
        */
        get editorTextField() {
            return this.i.kn;
        }
        set editorTextField(v) {
            this.i.kn = v;
        }
        /**
         * Gets or sets the ComboBox value field.
        */
        get editorValueField() {
            return this.i.j3;
        }
        set editorValueField(v) {
            this.i.j3 = v;
        }
        findByName(name) {
            var baseResult = super.findByName(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;
})();
//# sourceMappingURL=igc-numeric-column-component.js.map
