module.exports = {
    touchStart: function (event, ownerInstance) {
        var instance = event.instance;
        var dataSet = instance.getDataset();
        var disabled = dataSet.disabled;
        var loading = dataSet.loading;

        if (instance && !disabled && !loading) {
            instance.addClass('active');
        }
    },

    touchEnd: function (event, ownerInstance) {
        var instance = event.instance;
        var dataSet = instance.getDataset();
        var disabled = dataSet.disabled;
        var loading = dataSet.loading;

        if (instance && !disabled && !loading) {
            instance.removeClass('active');
        }
    },
};
