<template>
  <Page
    :banner-data="bannerData"
    :extra-fields="extraFields"
    :extra-request-filters="{ 'news_listing:eq': 1 }"
    :extra-categories-config="m_categoriesConfig"
    :items-per-page="10"
    filters-input="selectbox"
  />
</template>

<script>
import Page from '@inside-news/components/pages/ListingPage'

import NewsMixin from '../../mixins/news-categories-mixin'

export default {
  name: 'NewsListingPage',
  components: { Page },
  mixins: [NewsMixin],
  data() {
    return {
      bannerData: {
        add: ['news_categories', 'news'],
        page: 'news',
        html: true
      },
      extraFields: [
        { entities: ['title', 'uuid'] },
        'news_listing',
        'total_views',
        'unique_views'
      ]
    }
  }
}
</script>

<style lang="scss">
.news-listing-page-container {
  .filters-container {
    display: flex;
    justify-content: center;

    .filter-item-container {
      max-width: 300px;
    }
  }
}
</style>
