<template>
  <ul
    class="project-list"
    data-cy="project-list">

    <project-list-item
      :key="project.id"
      :project="project"
      data-cy="project"
      class="project-list__item"
      v-for="project in projects"/>
  </ul>
</template>

<script>
  import OwnerWidget from '@/components/portfolio/OwnerWidget';
  import EntryCountWidget from '@/components/rooms/EntryCountWidget';
  import MoreActions from '@/components/rooms/MoreActions';
  import ProjectActions from '@/components/portfolio/ProjectActions';
  import ProjectListItem from '@/components/portfolio/ProjectListItem';

  export default {
    props: {
      projects: {
        type: Array,
        default: () => ([]),
      },
    },
    components: {ProjectListItem, MoreActions, EntryCountWidget, OwnerWidget, ProjectActions},
  };
</script>

<style scoped lang="scss">
  @import '~styles/helpers';

  .project-list {
    border-top: 1px solid $color-silver;
  }

</style>
