/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { Base, markType } from "igniteui-webcomponents-core";
import { IEditorView_$type } from "./IEditorView";
/**
 * @hidden
 */
var BaseEditorView = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(BaseEditorView, _super);
    function BaseEditorView(a, b) {
        var _this = _super.call(this) || this;
        _this.c = false;
        _this.f = null;
        _this.b = null;
        _this.e = null;
        _this._container = null;
        _this.d = false;
        _this.valueProvided = null;
        _this.userTyping = null;
        _this.lostFocus = null;
        _this.gotFocus = null;
        _this.a = null;
        _this.e = a;
        _this.a = b;
        return _this;
    }
    Object.defineProperty(BaseEditorView.prototype, "container", {
        get: function () {
            return this._container;
        },
        set: function (a) {
            this._container = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseEditorView.prototype, "value", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            var b = this.f;
            this.f = a;
            if (b != this.f) {
                this.n("Value", b, this.f);
            }
        },
        enumerable: true,
        configurable: true
    });
    BaseEditorView.prototype.k = function (a, b) {
        if (this.valueProvided != null) {
            this.valueProvided(this, a, b);
        }
    };
    BaseEditorView.prototype.j = function () {
        if (this.userTyping != null) {
            this.userTyping(this);
        }
    };
    BaseEditorView.prototype.i = function () {
        if (this.lostFocus != null) {
            this.lostFocus(this);
        }
    };
    BaseEditorView.prototype.h = function () {
        if (this.gotFocus != null) {
            this.gotFocus(this);
        }
    };
    BaseEditorView.prototype.setFont = function (a) {
    };
    BaseEditorView.prototype.attachEvents = function () {
    };
    BaseEditorView.prototype.detachEvents = function () {
    };
    BaseEditorView.prototype.onTargetChanged = function () {
    };
    BaseEditorView.prototype.onEditEnded = function () {
        this.d = false;
    };
    BaseEditorView.prototype.onEditStarted = function () {
        this.d = true;
    };
    BaseEditorView.prototype.cleanUp = function () {
        this.f = null;
        this.d = false;
    };
    BaseEditorView.prototype.focus = function () {
        var _this = this;
        if (this.c) {
            return;
        }
        if (this.b == null) {
            this.b = this.e.getRequestAnimationFrame();
        }
        this.b(function () {
            _this.l();
            _this.c = false;
        });
        this.c = true;
    };
    BaseEditorView.prototype.l = function () {
    };
    BaseEditorView.prototype.n = function (a, b, c) {
        switch (a) {
            case "Value":
                this.o();
                break;
        }
    };
    BaseEditorView.prototype.o = function () {
    };
    BaseEditorView.prototype.onInputKeyDown = function (a, b) {
        if (!this.d) {
            var c = b.keyCode;
            switch (c) {
                case 37:
                case 39:
                case 38:
                case 40:
                case 32:
                    b.preventDefault();
                    break;
            }
        }
        else {
            var d = b.keyCode;
            switch (d) {
                case 37:
                case 39:
                case 38:
                case 40:
                case 32:
                    b.stopPropagation();
                    break;
            }
        }
    };
    BaseEditorView.$t = markType(BaseEditorView, 'BaseEditorView', Base.$, [IEditorView_$type]);
    return BaseEditorView;
}(Base));
export { BaseEditorView };
//# sourceMappingURL=BaseEditorView.js.map
