import ReactDom from '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 = ReactDom.findDOMNode($el);
                    if ($el && $el.focus) {
                        $el.focus();
                    }
                }
            }
        };
        this.setElAndFocus = function (el) {
            _this.setEl(el);
            _this.focus();
        };
    }
    return FocusHelper;
}());
export { FocusHelper };
//# sourceMappingURL=FocusHelper.js.map