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.
*/
export let IgcDateTimeColumnComponent = /*@__PURE__*/ (() => {
    class IgcDateTimeColumnComponent extends IgcColumnComponent {
        constructor() {
            super();
        }
        createImplementation() {
            return new DateTimeColumn();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        connectedCallback() {
            if (super["connectedCallback"]) {
                super["connectedCallback"]();
            }
            if (!this._attached) {
                this._attached = true;
                this._flushQueuedAttributes();
            }
        }
        static get observedAttributes() {
            if (IgcDateTimeColumnComponent._observedAttributesIgcDateTimeColumnComponent == null) {
                let names = getAllPropertyNames(IgcDateTimeColumnComponent);
                for (let i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcDateTimeColumnComponent._observedAttributesIgcDateTimeColumnComponent = names;
            }
            return IgcDateTimeColumnComponent._observedAttributesIgcDateTimeColumnComponent;
        }
        static register() {
            if (!IgcDateTimeColumnComponent._isElementRegistered) {
                IgcDateTimeColumnComponent._isElementRegistered = true;
                RegisterElementHelper.registerElement(IgcDateTimeColumnComponent.htmlTagName, IgcDateTimeColumnComponent);
            }
        }
        /**
         * Gets or sets the date time format to use for this column. If FormatString is specificied this value is ignored.
        */
        get dateTimeFormat() {
            return this.i.j7;
        }
        set dateTimeFormat(v) {
            this.i.j7 = ensureEnum(DateTimeFormats_$type, v);
            this._a("dateTimeFormat", enumToString(DateTimeFormats_$type, 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.ki;
        }
        set formatString(v) {
            this.i.ki = v;
        }
        get formatSpecifiers() {
            return this.i.j4;
        }
        set formatSpecifiers(v) {
            this.i.j4 = v;
        }
        /**
         * Gets or sets the INTL DateTimeFormat object to use for formatting the date values.
        */
        get formatOverride() {
            return this.i.kc;
        }
        set formatOverride(v) {
            this.i.kc = v;
        }
        /**
         * Gets or sets the editor type used for editing cells in this column.
        */
        get editorType() {
            return this.i.j8;
        }
        set editorType(v) {
            this.i.j8 = ensureEnum(EditorType_$type, v);
            this._a("editorType", enumToString(EditorType_$type, this.i.j8));
        }
        /**
         * Gets or sets the ComboBox data source.
        */
        get editorDataSource() {
            return this.i.kb;
        }
        set editorDataSource(v) {
            this.i.kb = v;
        }
        /**
         * Gets or sets the ComboBox text field.
        */
        get editorTextField() {
            return this.i.kf;
        }
        set editorTextField(v) {
            this.i.kf = 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;
        }
    }
    IgcDateTimeColumnComponent._observedAttributesIgcDateTimeColumnComponent = null;
    IgcDateTimeColumnComponent.htmlTagName = "igc-date-time-column";
    IgcDateTimeColumnComponent._isElementRegistered = false;
    return IgcDateTimeColumnComponent;
})();
//# sourceMappingURL=igc-date-time-column-component.js.map
