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 { GridColumnGroupOptions } from "./GridColumnGroupOptions";
import { IgcGridColumnOptionsSimpleSectionBaseComponent } from "./igc-grid-column-options-simple-section-base-component";
export let IgcGridColumnGroupOptionsComponent = /*@__PURE__*/ (() => {
    class IgcGridColumnGroupOptionsComponent 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 GridColumnGroupOptions();
        }
        get i() {
            return this._implementation;
        }
        disconnectedCallback() {
            this._disconnected = true;
        }
        connectedCallback() {
            if (this._disconnected) {
                this._disconnected = false;
                return;
            }
            this.classList.add("ig-grid-column-group-options");
            this.classList.add("igc-grid-column-group-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 (IgcGridColumnGroupOptionsComponent._observedAttributesIgcGridColumnGroupOptionsComponent == null) {
                let names = getAllPropertyNames(IgcGridColumnGroupOptionsComponent);
                for (let i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcGridColumnGroupOptionsComponent._observedAttributesIgcGridColumnGroupOptionsComponent = names;
            }
            return IgcGridColumnGroupOptionsComponent._observedAttributesIgcGridColumnGroupOptionsComponent;
        }
        static register() {
            if (!IgcGridColumnGroupOptionsComponent._isElementRegistered) {
                IgcGridColumnGroupOptionsComponent._isElementRegistered = true;
                RegisterElementHelper.registerElement(IgcGridColumnGroupOptionsComponent.htmlTagName, IgcGridColumnGroupOptionsComponent);
            }
        }
    }
    IgcGridColumnGroupOptionsComponent._observedAttributesIgcGridColumnGroupOptionsComponent = null;
    IgcGridColumnGroupOptionsComponent.htmlTagName = "igc-grid-column-group-options";
    IgcGridColumnGroupOptionsComponent._isElementRegistered = false;
    return IgcGridColumnGroupOptionsComponent;
})();
//# sourceMappingURL=igc-grid-column-group-options-component.js.map
