<template>
  <NewsListingBlock
    :block-options="blockOptions"
    :extra-fields="extraFields"
    :extra-filters="extraFilters"
    :items-per-page="3"
    :pagination="false"
  />
</template>

<script>
import NewsListingBlock from '@inside-news/components/lib/NewsListingBlock'

export default {
  name: 'HomeNewsListing',
  $_i18nRootPath: 'customs.HOMEPAGE.news',
  components: { NewsListingBlock },
  data() {
    return {
      extraFields: ['total_views', 'unique_views'],
      extraFilters: {
        'is_featured:ne': 1,
        'is_homepage_displayed:eq': 1
      }
    }
  },
  computed: {
    blockOptions() {
      return {
        link: { name: 'NewsListingPage' },
        linkLabel: this.$t('customs.HOMEPAGE.news.moreNews', this.$_currentLang)
      }
    }
  }
}
</script>
