"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_dom_1 = __importDefault(require("react-dom"));
var FocusHelper = /** @class */ (function () {
    function FocusHelper() {
        var _this = this;
        this.$el = null;
        this.setEl = function (el) { return (_this.$el = el); };
        this.focus = function () {
            var $el = _this.$el;
            if ($el) {
                if ($el.focus) {
                    $el.focus();
                }
                else {
                    $el = react_dom_1.default.findDOMNode($el);
                    if ($el && $el.focus) {
                        $el.focus();
                    }
                }
            }
        };
        this.setElAndFocus = function (el) {
            _this.setEl(el);
            _this.focus();
        };
    }
    return FocusHelper;
}());
exports.FocusHelper = FocusHelper;
//# sourceMappingURL=FocusHelper.js.map