"use strict";

var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.DEFAULT_FILTER_OPTIONS = void 0;
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
var DEFAULT_FILTER_OPTIONS = exports.DEFAULT_FILTER_OPTIONS = [{
  title: '包含',
  key: 'contain',
  filter: function filter(value) {
    return function (data) {
      if (data == null) {
        return false;
      }
      if (typeof data === 'number') {
        data = data + '';
      }
      return (0, _includes.default)(data).call(data, value[0]);
    };
  }
}, {
  title: '不包含',
  key: 'notContain',
  filter: function filter(value) {
    return function (data) {
      if (data == null) {
        return true;
      }
      if (typeof data === 'number') {
        data = data + '';
      }
      return !(0, _includes.default)(data).call(data, value[0]);
    };
  }
}, {
  title: '等于',
  key: 'equal',
  filter: function filter(value) {
    return function (data) {
      return value[0] === data;
    };
  }
}, {
  title: '不等于',
  key: 'notEqual',
  filter: function filter(value) {
    return function (data) {
      return value[0] !== data;
    };
  }
}, {
  title: '为空',
  key: 'isNull',
  filter: function filter() {
    return function (data) {
      return !data;
    };
  }
}, {
  title: '不为空',
  key: 'notIsNull',
  filter: function filter() {
    return function (data) {
      return !!data;
    };
  }
}];