'use strict';

var _Template = require('./Template');

var _Template2 = _interopRequireDefault(_Template);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// add support for functions that return JSX elements in place of XTemplates

var getTpl = Ext.XTemplate.getTpl;
var originalGet = Ext.XTemplate.get;

Ext.XTemplate.get = function (fn) {
    if (typeof fn === 'function') {
        return new _Template2.default(fn);
    } else {
        return originalGet.apply(Ext.XTemplate, arguments);
    }
};

Ext.XTemplate.getTpl = function () {
    return getTpl.apply(Ext.XTemplate, arguments);
};

// automatically persist event before rippling

var originalRipple = Ext.dom.Element.prototype.ripple;

Ext.dom.Element.prototype.ripple = function (event) {
    if (event && event.persist) event.persist();
    return originalRipple.apply(this, arguments);
};
//# sourceMappingURL=overrides.js.map