import { TemplateCellUpdatingEventArgs as TemplateCellUpdatingEventArgs_internal } from "./TemplateCellUpdatingEventArgs";
import { IgcDateTimeCellInfo } from "./igc-date-time-cell-info";
import { IgcImageCellInfo } from "./igc-image-cell-info";
import { IgcNumericCellInfo } from "./igc-numeric-cell-info";
import { IgcRowSeparatorInfo } from "./igc-row-separator-info";
import { IgcSectionHeaderCellInfo } from "./igc-section-header-cell-info";
import { IgcTemplateCellInfo } from "./igc-template-cell-info";
import { IgcTemplateHeaderCellInfo } from "./igc-template-header-cell-info";
import { IgcTemplateSectionHeaderCellInfo } from "./igc-template-section-header-cell-info";
import { IgcTextCellInfo } from "./igc-text-cell-info";
import { IgcTextHeaderCellInfo } from "./igc-text-header-cell-info";
/**
 * Information about the cell that has content which is being created or updated.
*/
var IgcTemplateCellUpdatingEventArgs = /** @class */ /*@__PURE__*/ (function () {
    function IgcTemplateCellUpdatingEventArgs() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgcTemplateCellUpdatingEventArgs.prototype.createImplementation = function () {
        return new TemplateCellUpdatingEventArgs_internal();
    };
    Object.defineProperty(IgcTemplateCellUpdatingEventArgs.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcTemplateCellUpdatingEventArgs.prototype.onImplementationCreated = function () {
    };
    IgcTemplateCellUpdatingEventArgs.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgcTemplateCellUpdatingEventArgs.prototype, "isCanvasBased", {
        get: function () {
            return this.i.content.isCanvasBased;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcTemplateCellUpdatingEventArgs.prototype, "content", {
        /**
         * The host in which to add or update content if this is a DOM based cell.
        */
        get: function () {
            if (this.isCanvasBased) {
                return null;
            }
            else {
                return this.i.content.element.getNativeElement();
            }
        },
        enumerable: true,
        configurable: true
    });
    IgcTemplateCellUpdatingEventArgs.prototype.ensureCorrectSize = function () {
        return this.i.content.ensureCorrectSize();
    };
    Object.defineProperty(IgcTemplateCellUpdatingEventArgs.prototype, "context", {
        get: function () {
            if (this.isCanvasBased) {
                return this.i.content.templateContext;
            }
            else {
                return null;
            }
        },
        enumerable: true,
        configurable: true
    });
    IgcTemplateCellUpdatingEventArgs.prototype.renderStandardBackground = function () {
        this.i.content.renderStandardBackground();
    };
    IgcTemplateCellUpdatingEventArgs.prototype.renderStandardContent = function () {
        this.i.content.renderStandardContent();
    };
    Object.defineProperty(IgcTemplateCellUpdatingEventArgs.prototype, "cellInfo", {
        /**
         * The backing information for the current cell.
        */
        get: function () {
            if (this.i.cellInfo == null) {
                return null;
            }
            if (!this.i.cellInfo.externalObject) {
                var ext = null;
                switch (this.i.cellInfo.$type.name) {
                    case "DateTimeCellModel":
                        ext = new IgcDateTimeCellInfo();
                        break;
                    case "ImageCellModel":
                        ext = new IgcImageCellInfo();
                        break;
                    case "NumericCellModel":
                        ext = new IgcNumericCellInfo();
                        break;
                    case "RowSeparatorModel":
                        ext = new IgcRowSeparatorInfo();
                        break;
                    case "SectionHeaderCellModel":
                        ext = new IgcSectionHeaderCellInfo();
                        break;
                    case "TemplateCellModel":
                        ext = new IgcTemplateCellInfo();
                        break;
                    case "TemplateHeaderCellModel":
                        ext = new IgcTemplateHeaderCellInfo();
                        break;
                    case "TemplateSectionHeaderCellModel":
                        ext = new IgcTemplateSectionHeaderCellInfo();
                        break;
                    case "TextCellModel":
                        ext = new IgcTextCellInfo();
                        break;
                    case "TextHeaderCellModel":
                        ext = new IgcTextHeaderCellInfo();
                        break;
                }
                ext._implementation = this.i.cellInfo;
                this.i.cellInfo.externalObject = ext;
            }
            return this.i.cellInfo.externalObject;
        },
        enumerable: true,
        configurable: true
    });
    return IgcTemplateCellUpdatingEventArgs;
}());
export { IgcTemplateCellUpdatingEventArgs };
//# sourceMappingURL=igc-template-cell-updating-event-args.js.map
