import { NamePatcher, toSpinal, getAllPropertyNames } from "igniteui-webcomponents-core";
import { WebComponentRenderer } from "igniteui-webcomponents-core";
import { DataGridStylingDefaults } from './DataGridStylingDefaults';
import { RegisterElementHelper } from "igniteui-webcomponents-core";
import { GridColumnHideOptions } from "./GridColumnHideOptions";
import { IgcGridColumnOptionsSimpleSectionBaseComponent } from "./igc-grid-column-options-simple-section-base-component";
export let IgcGridColumnHideOptionsComponent = /*@__PURE__*/ (() => {
    class IgcGridColumnHideOptionsComponent extends IgcGridColumnOptionsSimpleSectionBaseComponent {
        constructor() {
            super();
            this._disconnected = false;
            if (this._styling) {
                NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
            }
            this._webComponentRenderer = new WebComponentRenderer(this, document, true, DataGridStylingDefaults);
            this._webComponentWrapper = this._webComponentRenderer.createElement("div");
            this._webComponentRenderer.updateRoot(this._webComponentWrapper);
            //this._webComponentRenderer.rootWrapper.append(this._webComponentWrapper);
            this._webComponentWrapper.setStyleProperty("display", "block");
            this._webComponentWrapper.setStyleProperty("width", "100%");
            this._webComponentWrapper.setStyleProperty("height", "100%");
            this.i.provideRenderer(this._webComponentRenderer);
        }
        set height(value) {
            this._height = value;
            this.style.height = value;
        }
        get height() {
            return this._height;
        }
        set width(value) {
            this._width = value;
            this.style.width = value;
        }
        get width() {
            return this._width;
        }
        // supports angular themes or custom properties set in CSS
        updateStyle() {
            this._styling(this, this);
        }
        destroy() {
            this._implementation.destroy();
            this._webComponentRenderer.destroy();
        }
        createImplementation() {
            return new GridColumnHideOptions();
        }
        get i() {
            return this._implementation;
        }
        disconnectedCallback() {
            this._disconnected = true;
        }
        connectedCallback() {
            if (this._disconnected) {
                this._disconnected = false;
                return;
            }
            this.classList.add("ig-grid-column-hide-options");
            this.classList.add("igc-grid-column-hide-options");
            this.appendChild(this._webComponentRenderer.rootWrapper.getNativeElement());
            this._attached = true;
            this.style.display = "block";
            this.style.height = this._height;
            this.style.width = this._width;
            this._flushQueuedAttributes();
            // supports themes or custom properties set in CSS
            this._styling(this, this);
            this.afterContentInit();
        }
        afterContentInit() {
        }
        static get observedAttributes() {
            if (IgcGridColumnHideOptionsComponent._observedAttributesIgcGridColumnHideOptionsComponent == null) {
                let names = getAllPropertyNames(IgcGridColumnHideOptionsComponent);
                for (let i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcGridColumnHideOptionsComponent._observedAttributesIgcGridColumnHideOptionsComponent = names;
            }
            return IgcGridColumnHideOptionsComponent._observedAttributesIgcGridColumnHideOptionsComponent;
        }
        static register() {
            if (!IgcGridColumnHideOptionsComponent._isElementRegistered) {
                IgcGridColumnHideOptionsComponent._isElementRegistered = true;
                RegisterElementHelper.registerElement(IgcGridColumnHideOptionsComponent.htmlTagName, IgcGridColumnHideOptionsComponent);
            }
        }
    }
    IgcGridColumnHideOptionsComponent._observedAttributesIgcGridColumnHideOptionsComponent = null;
    IgcGridColumnHideOptionsComponent.htmlTagName = "igc-grid-column-hide-options";
    IgcGridColumnHideOptionsComponent._isElementRegistered = false;
    return IgcGridColumnHideOptionsComponent;
})();
//# sourceMappingURL=igc-grid-column-hide-options-component.js.map
