import * as tslib_1 from "tslib";
import { DateTimeFormats_$type } from "./DateTimeFormats";
import { EditorType_$type } from "./EditorType";
import { IgcColumnComponent } from "./igc-column-component";
import { DateTimeColumn } from "./DateTimeColumn";
import { getAllPropertyNames, toSpinal, ensureEnum, enumToString, arrayFindByName } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
 * A column for displaying date/time values.
*/
var IgcDateTimeColumnComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgcDateTimeColumnComponent, _super);
    function IgcDateTimeColumnComponent() {
        return _super.call(this) || this;
    }
    IgcDateTimeColumnComponent.prototype.createImplementation = function () {
        return new DateTimeColumn();
    };
    Object.defineProperty(IgcDateTimeColumnComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcDateTimeColumnComponent.prototype.connectedCallback = function () {
        if (_super.prototype["connectedCallback"]) {
            _super.prototype["connectedCallback"].call(this);
        }
        if (!this._attached) {
            this._attached = true;
            this._flushQueuedAttributes();
        }
    };
    Object.defineProperty(IgcDateTimeColumnComponent, "observedAttributes", {
        get: function () {
            if (IgcDateTimeColumnComponent._observedAttributesIgcDateTimeColumnComponent == null) {
                var names = getAllPropertyNames(IgcDateTimeColumnComponent);
                for (var i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcDateTimeColumnComponent._observedAttributesIgcDateTimeColumnComponent = names;
            }
            return IgcDateTimeColumnComponent._observedAttributesIgcDateTimeColumnComponent;
        },
        enumerable: true,
        configurable: true
    });
    IgcDateTimeColumnComponent.register = function () {
        if (!IgcDateTimeColumnComponent._isElementRegistered) {
            IgcDateTimeColumnComponent._isElementRegistered = true;
            RegisterElementHelper.registerElement(IgcDateTimeColumnComponent.htmlTagName, IgcDateTimeColumnComponent);
        }
    };
    Object.defineProperty(IgcDateTimeColumnComponent.prototype, "dateTimeFormat", {
        /**
         * Gets or sets the date time format to use for this column. If FormatString is specificied this value is ignored.
        */
        get: function () {
            return this.i.j7;
        },
        set: function (v) {
            this.i.j7 = ensureEnum(DateTimeFormats_$type, v);
            this._a("dateTimeFormat", enumToString(DateTimeFormats_$type, this.i.j7));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcDateTimeColumnComponent.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.ki;
        },
        set: function (v) {
            this.i.ki = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcDateTimeColumnComponent.prototype, "formatSpecifiers", {
        get: function () {
            return this.i.j4;
        },
        set: function (v) {
            this.i.j4 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcDateTimeColumnComponent.prototype, "formatOverride", {
        /**
         * Gets or sets the INTL DateTimeFormat object to use for formatting the date values.
        */
        get: function () {
            return this.i.kc;
        },
        set: function (v) {
            this.i.kc = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcDateTimeColumnComponent.prototype, "editorType", {
        /**
         * Gets or sets the editor type used for editing cells in this column.
        */
        get: function () {
            return this.i.j8;
        },
        set: function (v) {
            this.i.j8 = ensureEnum(EditorType_$type, v);
            this._a("editorType", enumToString(EditorType_$type, this.i.j8));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcDateTimeColumnComponent.prototype, "editorDataSource", {
        /**
         * Gets or sets the ComboBox data source.
        */
        get: function () {
            return this.i.kb;
        },
        set: function (v) {
            this.i.kb = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcDateTimeColumnComponent.prototype, "editorTextField", {
        /**
         * Gets or sets the ComboBox text field.
        */
        get: function () {
            return this.i.kf;
        },
        set: function (v) {
            this.i.kf = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcDateTimeColumnComponent.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
    });
    IgcDateTimeColumnComponent.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;
    };
    IgcDateTimeColumnComponent._observedAttributesIgcDateTimeColumnComponent = null;
    IgcDateTimeColumnComponent.htmlTagName = "igc-date-time-column";
    IgcDateTimeColumnComponent._isElementRegistered = false;
    return IgcDateTimeColumnComponent;
}(IgcColumnComponent));
export { IgcDateTimeColumnComponent };
//# sourceMappingURL=igc-date-time-column-component.js.map
