<template>
  <div class="q-mt-md flex">
    <div>
      <task-comments-item
        v-for="comment in comments"
        :key="comment.id"
        :comment="comment"
        :sent="comment.creatorUid === currentManager.id"
      />
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { TaskComment } from '@/widgets/tasks/types/TaskComment'
import { Manager } from '@/types/Manager'
import TaskCommentsItem from '@/widgets/tasks/components/tasks/task/TaskCommentsItem.vue'

@Component({
  components: { TaskCommentsItem },
})
export default class TaskComments extends Vue {
  @Prop({ type: Array, required: true })
  comments!: TaskComment[]

  @Prop({ type: Object, required: true })
  currentManager!: Manager
}
</script>
