import * as tslib_1 from "tslib";
import { IgcCellInfo } from "./igc-cell-info";
import { DataSourceSchemaPropertyType_$type } from "igniteui-webcomponents-core";
import { EditorType_$type } from "./EditorType";
import { EditorCellModel as EditorCellModel_internal } from "./EditorCellModel";
import { ensureBool, ensureEnum } from "igniteui-webcomponents-core";
/**
 * Represents info about the current cell.
*/
var IgcEditorCellInfo = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgcEditorCellInfo, _super);
    function IgcEditorCellInfo() {
        return _super.call(this) || this;
    }
    IgcEditorCellInfo.prototype.createImplementation = function () {
        return new EditorCellModel_internal();
    };
    Object.defineProperty(IgcEditorCellInfo.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "isHidden", {
        /**
         * Gets or sets whether the editor cell is hidden or not.
        */
        get: function () {
            return this.i.k7;
        },
        set: function (v) {
            this.i.k7 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "editTarget", {
        /**
         * Gets or sets the edit target for this cell.
        */
        get: function () {
            if (this.i.k1 == null) {
                return null;
            }
            return this.i.k1.externalObject;
        },
        set: function (v) {
            v == null ? this.i.k1 = null : this.i.k1 = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "dataType", {
        /**
         * Gets or sets the data type associated with the cell being edited.
        */
        get: function () {
            return this.i.kz;
        },
        set: function (v) {
            this.i.kz = ensureEnum(DataSourceSchemaPropertyType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "errorMessage", {
        /**
         * Gets or sets the error message to display in the editor cell.
        */
        get: function () {
            return this.i.lx;
        },
        set: function (v) {
            this.i.lx = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "editValue", {
        /**
         * Gets or sets the user selected value.
        */
        get: function () {
            return this.i.ln;
        },
        set: function (v) {
            this.i.ln = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "editorType", {
        /**
         * Gets or sets the type of editor to use while cell editing.
        */
        get: function () {
            return this.i.k3;
        },
        set: function (v) {
            this.i.k3 = ensureEnum(EditorType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "editorDataSource", {
        /**
         * Gets or sets the data source to use for the editor where it makes sense.
        */
        get: function () {
            return this.i.lm;
        },
        set: function (v) {
            this.i.lm = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "editorTextField", {
        /**
         * Gets or sets the editors display member.
        */
        get: function () {
            return this.i.ls;
        },
        set: function (v) {
            this.i.ls = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "editorValueField", {
        /**
         * Gets or sets the editors value member.
        */
        get: function () {
            return this.i.kx;
        },
        set: function (v) {
            this.i.kx = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "targetRow", {
        /**
         * Gets the row index that the editor cell is targeting for edit.
        */
        get: function () {
            return this.i.lk;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcEditorCellInfo.prototype, "targetColumn", {
        /**
         * Gets the column index that the editor cell is targeting for edit.
        */
        get: function () {
            return this.i.lj;
        },
        enumerable: true,
        configurable: true
    });
    IgcEditorCellInfo.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.editTarget && this.editTarget.name && this.editTarget.name == name) {
            return this.editTarget;
        }
        return null;
    };
    return IgcEditorCellInfo;
}(IgcCellInfo));
export { IgcEditorCellInfo };
//# sourceMappingURL=igc-editor-cell-info.js.map
