'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

exports.default = function (pluginContext) {
  var _pluginContext$search = pluginContext.searchOperators,
      OP_EQ = _pluginContext$search.OP_EQ,
      OP_OR = _pluginContext$search.OP_OR,
      OP_CONTAIN = _pluginContext$search.OP_CONTAIN;
  var extensions = pluginContext.config.extensions;


  return {
    op: OP_OR,
    value: [{
      op: OP_CONTAIN,
      path: 'ns2:media_common/identificationNumber'
    }, {
      op: OP_CONTAIN,
      path: 'ns2:media_common/title'
    }, {
      op: OP_EQ,
      path: 'ns2:media_common/creator'
    }, {
      op: OP_EQ,
      path: 'ns2:media_common/languageList/language'
    }, {
      op: OP_EQ,
      path: 'ns2:media_common/publisher'
    }, {
      op: OP_EQ,
      path: 'ns2:media_common/typeList/type'
    },
    // {
    //   op: OP_RANGE,
    //   path: 'ns2:media_common/dateGroupList/dateGroup',
    // },
    {
      op: OP_CONTAIN,
      path: 'ns2:media_common/source'
    }, {
      op: OP_CONTAIN,
      path: 'ns2:media_common/subjectList/subject'
    }, {
      op: OP_EQ,
      path: 'ns2:media_common/rightsHolder'
    }].concat(_toConsumableArray(extensions.core.advancedSearch))
  };
};