import * as tslib_1 from "tslib";
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 { GridColumnPinOptions } from "./GridColumnPinOptions";
import { IgcGridColumnOptionsSimpleSectionBaseComponent } from "./igc-grid-column-options-simple-section-base-component";
var IgcGridColumnPinOptionsComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgcGridColumnPinOptionsComponent, _super);
    function IgcGridColumnPinOptionsComponent() {
        var _this = _super.call(this) || this;
        _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);
        return _this;
    }
    Object.defineProperty(IgcGridColumnPinOptionsComponent.prototype, "height", {
        get: function () {
            return this._height;
        },
        set: function (value) {
            this._height = value;
            this.style.height = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcGridColumnPinOptionsComponent.prototype, "width", {
        get: function () {
            return this._width;
        },
        set: function (value) {
            this._width = value;
            this.style.width = value;
        },
        enumerable: true,
        configurable: true
    });
    // supports angular themes or custom properties set in CSS
    IgcGridColumnPinOptionsComponent.prototype.updateStyle = function () {
        this._styling(this, this);
    };
    IgcGridColumnPinOptionsComponent.prototype.destroy = function () {
        this._implementation.destroy();
        this._webComponentRenderer.destroy();
    };
    IgcGridColumnPinOptionsComponent.prototype.createImplementation = function () {
        return new GridColumnPinOptions();
    };
    Object.defineProperty(IgcGridColumnPinOptionsComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcGridColumnPinOptionsComponent.prototype.disconnectedCallback = function () {
        this._disconnected = true;
    };
    IgcGridColumnPinOptionsComponent.prototype.connectedCallback = function () {
        if (this._disconnected) {
            this._disconnected = false;
            return;
        }
        this.classList.add("ig-grid-column-pin-options");
        this.classList.add("igc-grid-column-pin-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();
    };
    IgcGridColumnPinOptionsComponent.prototype.afterContentInit = function () {
    };
    Object.defineProperty(IgcGridColumnPinOptionsComponent, "observedAttributes", {
        get: function () {
            if (IgcGridColumnPinOptionsComponent._observedAttributesIgcGridColumnPinOptionsComponent == null) {
                var names = getAllPropertyNames(IgcGridColumnPinOptionsComponent);
                for (var i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcGridColumnPinOptionsComponent._observedAttributesIgcGridColumnPinOptionsComponent = names;
            }
            return IgcGridColumnPinOptionsComponent._observedAttributesIgcGridColumnPinOptionsComponent;
        },
        enumerable: true,
        configurable: true
    });
    IgcGridColumnPinOptionsComponent.register = function () {
        if (!IgcGridColumnPinOptionsComponent._isElementRegistered) {
            IgcGridColumnPinOptionsComponent._isElementRegistered = true;
            RegisterElementHelper.registerElement(IgcGridColumnPinOptionsComponent.htmlTagName, IgcGridColumnPinOptionsComponent);
        }
    };
    Object.defineProperty(IgcGridColumnPinOptionsComponent.prototype, "pinLeftCaption", {
        get: function () {
            return this.i.b4;
        },
        set: function (v) {
            this.i.b4 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcGridColumnPinOptionsComponent.prototype, "pinRightCaption", {
        get: function () {
            return this.i.b8;
        },
        set: function (v) {
            this.i.b8 = v;
        },
        enumerable: true,
        configurable: true
    });
    IgcGridColumnPinOptionsComponent._observedAttributesIgcGridColumnPinOptionsComponent = null;
    IgcGridColumnPinOptionsComponent.htmlTagName = "igc-grid-column-pin-options";
    IgcGridColumnPinOptionsComponent._isElementRegistered = false;
    return IgcGridColumnPinOptionsComponent;
}(IgcGridColumnOptionsSimpleSectionBaseComponent));
export { IgcGridColumnPinOptionsComponent };
//# sourceMappingURL=igc-grid-column-pin-options-component.js.map
