<template>
  <div>
    <ArticleCard
      v-for="(a, index) in articles"
      :key="'article_' + index"
      :identifier="'article_' + index"
      :a="a"
      :dimensions="dimensions"
      :groups="groups"
      @delete-article="removeFromList(a)"
    />
  </div>
</template>

<script>
import ArticleCard from "./ArticleCard";

export default {
  name: "ArticlesView",
  components: {ArticleCard},
  props: {
    articles: {
      type: Array,
      default() { return []; }
    },
    groups: {
      type: Array,
      default() { return []; }
    },
    dimensions: {
      type: Array,
      default() { return []; }
    }
  },
  data() {
    return {

    }
  },
  computed: {

  },
  mounted() {
  },
  methods: {
    removeFromList(article) {
      this.articles.splice(this.articles.indexOf(article),1);
    }
  }
};
</script>
