<template>
  <ToolsListingBlock
    :block-options="blockOptions"
    :extra-filters="extraFilters"
    :pagination="false"
  />
</template>

<script>
import ToolsListingBlock from '@inside-tools/components/lib/ToolsListingBlock'

export default {
  name: 'HomeToolsListing',
  components: { ToolsListingBlock },
  computed: {
    blockOptions() {
      return {
        title: this.$t(
          'customs.HOMEPAGE.tools.title',
          this.$store.getters.getCurrentLang
        ),
        link: {
          name: 'ToolsListingPage',
          params: { slug: 'outils-de-communication' }
        },
        linkLabel: this.$_tr(
          'customs.HOMEPAGE.tools.link',
          this.$store.getters.getCurrentLang
        ),
        titleTag: 'h3'
      }
    },
    extraFilters() {
      return {
        limit: 2,
        sort: 'published_at:desc'
      }
    }
  }
}
</script>
