<template>
  <router-view :default-image-crops="defaultImageCrops"></router-view>
</template>

<script>
import assetOverviewPage from './asset-overview-page.vue';
import assetDetailPage from './asset-detail-page.vue';

import { ROUTES } from '../tools/route-utils';

export default {
  name: 'assets',
  props: {
    defaultImageCrops: {
      type: Array,
      default: () => []
    }
  },
  children: [
    {
      path: '',
      name: ROUTES.ASSET_OVERVIEW,
      component: assetOverviewPage,
      meta: {
        title: 'Asset overzicht'
      }
    },
    {
      path: 'create',
      name: ROUTES.ASSET_CREATE,
      component: assetDetailPage,
      props: true,
      meta: {
        title: 'Bestand uploaden',
        browserBack: true
      }
    },
    {
      path: 'detail/:id',
      name: ROUTES.ASSET_EDIT,
      component: assetDetailPage,
      meta: {
        title: 'Bestand wijzigen',
        browserBack: true
      }
    },
  ],
};
</script>
