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.
*/
export class IgcEditorCellInfo extends IgcCellInfo {
    createImplementation() {
        return new EditorCellModel_internal();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    constructor() {
        super();
    }
    /**
     * Gets or sets whether the editor cell is hidden or not.
    */
    get isHidden() {
        return this.i.k7;
    }
    set isHidden(v) {
        this.i.k7 = ensureBool(v);
    }
    /**
     * Gets or sets the edit target for this cell.
    */
    get editTarget() {
        if (this.i.k1 == null) {
            return null;
        }
        return this.i.k1.externalObject;
    }
    set editTarget(v) {
        v == null ? this.i.k1 = null : this.i.k1 = v.i;
    }
    /**
     * Gets or sets the data type associated with the cell being edited.
    */
    get dataType() {
        return this.i.kz;
    }
    set dataType(v) {
        this.i.kz = ensureEnum(DataSourceSchemaPropertyType_$type, v);
    }
    /**
     * Gets or sets the error message to display in the editor cell.
    */
    get errorMessage() {
        return this.i.lx;
    }
    set errorMessage(v) {
        this.i.lx = v;
    }
    /**
     * Gets or sets the user selected value.
    */
    get editValue() {
        return this.i.ln;
    }
    set editValue(v) {
        this.i.ln = v;
    }
    /**
     * Gets or sets the type of editor to use while cell editing.
    */
    get editorType() {
        return this.i.k3;
    }
    set editorType(v) {
        this.i.k3 = ensureEnum(EditorType_$type, v);
    }
    /**
     * Gets or sets the data source to use for the editor where it makes sense.
    */
    get editorDataSource() {
        return this.i.lm;
    }
    set editorDataSource(v) {
        this.i.lm = v;
    }
    /**
     * Gets or sets the editors display member.
    */
    get editorTextField() {
        return this.i.ls;
    }
    set editorTextField(v) {
        this.i.ls = v;
    }
    /**
     * Gets or sets the editors value member.
    */
    get editorValueField() {
        return this.i.kx;
    }
    set editorValueField(v) {
        this.i.kx = v;
    }
    /**
     * Gets the row index that the editor cell is targeting for edit.
    */
    get targetRow() {
        return this.i.lk;
    }
    /**
     * Gets the column index that the editor cell is targeting for edit.
    */
    get targetColumn() {
        return this.i.lj;
    }
    findByName(name) {
        var baseResult = super.findByName(name);
        if (baseResult) {
            return baseResult;
        }
        if (this.editTarget && this.editTarget.name && this.editTarget.name == name) {
            return this.editTarget;
        }
        return null;
    }
}
//# sourceMappingURL=igc-editor-cell-info.js.map
