<template>
  <Block :title="$_tr('title')" title-tag="h5" class="mb-xl">
    <Full
      :home-with-cards="false"
      :use-tree="false"
      :use-search="false"
      :likes-enabled="false"
      :link-types="null"
      :document-types="documentTypes"
      :folder-types="folderTypes"
    />
  </Block>
</template>

<script>
import { CONTENTS } from '@inside-ged/constants/default-contents'

import Full from '@inside-ged/components/lib/Full'
import Block from '@inside-commons/components/lib/Block'

const projectContents = CONTENTS({
  folderContents: ['project_folders'],
  documentsContents: ['project_documents']
})

export default {
  name: 'ProjectGed',
  $_i18nRootPath: 'customs.PROJECTS.ged',
  components: {
    Full,
    Block
  },
  computed: {
    folderTypes() {
      return {
        ...projectContents.folders,
        filters: {
          ...projectContents.folders.filters,
          projects: { 'slug:eq': this.$route.params.slug }
        },
        filtersInFields: false
      }
    },
    documentTypes() {
      return projectContents.documents
    }
  }
}
</script>
