import { GridCellEventArgs as GridCellEventArgs_internal } from "./GridCellEventArgs";
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";
import { MouseButton_$type } from "igniteui-webcomponents-core";
import { ensureBool, ensureEnum } from "igniteui-webcomponents-core";
/**
 * Information about the cell in context.
*/
var IgcGridCellEventArgs = /** @class */ /*@__PURE__*/ (function () {
    function IgcGridCellEventArgs() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgcGridCellEventArgs.prototype.createImplementation = function () {
        return new GridCellEventArgs_internal();
    };
    Object.defineProperty(IgcGridCellEventArgs.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcGridCellEventArgs.prototype.onImplementationCreated = function () {
    };
    IgcGridCellEventArgs.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgcGridCellEventArgs.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
    });
    Object.defineProperty(IgcGridCellEventArgs.prototype, "grid", {
        /**
     * Gets the grid owning the cell.
    */
        get: function () {
            if (this.i.grid == null) {
                return null;
            }
            return this.i.grid.externalObject;
        },
        set: function (v) {
            v == null ? this.i.grid = null : this.i.grid = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcGridCellEventArgs.prototype, "button", {
        /**
         * Gets which click type it is.
        */
        get: function () {
            return this.i.button;
        },
        set: function (v) {
            this.i.button = ensureEnum(MouseButton_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcGridCellEventArgs.prototype, "isDoubleClick", {
        /**
         * Is this a double click?
        */
        get: function () {
            return this.i.isDoubleClick;
        },
        set: function (v) {
            this.i.isDoubleClick = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    return IgcGridCellEventArgs;
}());
export { IgcGridCellEventArgs };
//# sourceMappingURL=igc-grid-cell-event-args.js.map
