<template>
  <NewsListingBlock
    :extra-filters="extraFilters"
    :grid-gap="$_theme('spacingL')"
    :block-options="{
      title: $_tr('customs.ENTITY.NEWS.title'),
      titleTag: 'h3'
    }"
  >
    <template #newsItem="{ item }">
      <Resume
        v-bind="item"
        :key="item.uuid"
        :to="{
          name: 'NewsPage',
          params: { slug: item.slug[0] }
        }"
      />
    </template>
  </NewsListingBlock>
</template>

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

export default {
  name: 'EntityNews',
  components: {
    NewsListingBlock,
    Resume
  },
  data() {
    return {
      extraFilters: {
        'is_featured:ne': 1,
        entities: { 'slug:eq': this.$route.params.slug },
        limit: 8
      }
    }
  }
}
</script>
