import * as tslib_1 from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { IgcTemplateSectionHeaderCellUpdatingEventArgs } from "./igc-template-section-header-cell-updating-event-args";
import { IgcSectionHeaderComponent } from "./igc-section-header-component";
import { TemplateSectionHeader } from "./TemplateSectionHeader";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
 * Used to configure the appearance of the section header cells.
*/
var IgcTemplateSectionHeaderComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgcTemplateSectionHeaderComponent, _super);
    function IgcTemplateSectionHeaderComponent() {
        var _this = _super.call(this) || this;
        _this._cellUpdating = null;
        _this._cellUpdating_wrapped = null;
        return _this;
    }
    IgcTemplateSectionHeaderComponent.prototype.createImplementation = function () {
        return new TemplateSectionHeader();
    };
    Object.defineProperty(IgcTemplateSectionHeaderComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcTemplateSectionHeaderComponent.prototype.connectedCallback = function () {
        if (_super.prototype["connectedCallback"]) {
            _super.prototype["connectedCallback"].call(this);
        }
        if (!this._attached) {
            this._attached = true;
            this._flushQueuedAttributes();
        }
    };
    Object.defineProperty(IgcTemplateSectionHeaderComponent, "observedAttributes", {
        get: function () {
            if (IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent == null) {
                var names = getAllPropertyNames(IgcTemplateSectionHeaderComponent);
                for (var i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent = names;
            }
            return IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent;
        },
        enumerable: true,
        configurable: true
    });
    IgcTemplateSectionHeaderComponent.register = function () {
        if (!IgcTemplateSectionHeaderComponent._isElementRegistered) {
            IgcTemplateSectionHeaderComponent._isElementRegistered = true;
            RegisterElementHelper.registerElement(IgcTemplateSectionHeaderComponent.htmlTagName, IgcTemplateSectionHeaderComponent);
        }
    };
    Object.defineProperty(IgcTemplateSectionHeaderComponent.prototype, "cellUpdating", {
        /**
         * Called when the cell content is being created or updated.
        */
        get: function () {
            return this._cellUpdating;
        },
        set: function (ev) {
            var _this = this;
            if (this._cellUpdating_wrapped !== null) {
                this.i.cellUpdating = delegateRemove(this.i.cellUpdating, this._cellUpdating_wrapped);
                this._cellUpdating_wrapped = null;
                this._cellUpdating = null;
            }
            this._cellUpdating = ev;
            this._cellUpdating_wrapped = function (o, e) {
                var outerArgs = new IgcTemplateSectionHeaderCellUpdatingEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeCellUpdating) {
                    _this.beforeCellUpdating(_this, outerArgs);
                }
                if (_this._cellUpdating) {
                    _this._cellUpdating(_this, outerArgs);
                }
            };
            this.i.cellUpdating = delegateCombine(this.i.cellUpdating, this._cellUpdating_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent = null;
    IgcTemplateSectionHeaderComponent.htmlTagName = "igc-template-section-header";
    IgcTemplateSectionHeaderComponent._isElementRegistered = false;
    return IgcTemplateSectionHeaderComponent;
}(IgcSectionHeaderComponent));
export { IgcTemplateSectionHeaderComponent };
//# sourceMappingURL=igc-template-section-header-component.js.map
