<template>
  <Block :title="$_tr('title')" title-tag="h3">
    <component-listing
      id="shortcuts-procedures"
      endpoint="content/procedures"
      direction="vertical"
      :items-per-page="5"
      :fields="['uuid', 'title', 'updated_at', 'content_type', 'slug']"
      :filters="{
        sort: 'published_at:desc',
        featured: true,
        'published_at:lte': 'now()'
      }"
      :pagination="false"
    >
      <template #default="{ item }">
        <ProcedureCard
          v-bind="item"
          :updated-at="item.updated_at"
          :content-type="item.content_type"
        />
      </template>
    </component-listing>
  </Block>
</template>

<script>
import Block from '@inside-commons/components/lib/Block'
import ProcedureCard from './lib/ProcedureCard.vue'

export default {
  name: 'ShortcutsProcedures',
  $_i18nRootPath: 'customs.PROCEDURES.SHORTCUTS',
  components: {
    Block,
    ProcedureCard
  }
}
</script>
