export default {
  props: {
    filter: {
      type: String,
      required: false,
      default: ''
    },
    pageUrl: {
      type: String,
      required: false,
      default: ''
    },
    tags: {
      type: Array,
      required: false,
      default: null
    },
    narrow: {
      type: Object,
      required: false,
      default: null
    },
    custom: {
      type: [Object, Array, String, Number],
      required: false,
      default: null
    }
  },
  computed: {
    context() {
      return {
        filter: this.filter,
        pageUrl: this.pageUrl,
        tags: this.tags,
        narrow: this.narrow,
        custom: this.custom
      }
    }
  },
  created() {
    this.$store.dispatch('search/setContext', this.context, { root: true })
  },
  render: function() {
    return null
  }
}
