<template>
  <manager-avatars
    v-on="$listeners"
    v-bind="$attrs"
    :selected-uids="selectedUids"
    :managers="managers"
    btn-label="Кандидаты..."
  />
</template>

<script lang="ts">
import { Component, Inject, Prop, Vue } from 'vue-property-decorator'
import ManagerAvatars from '@/widgets/base/components/manager-avatars/ManagerAvatars.vue'
import { ManagerModule } from '@/widgets/tasks/modules/ManagerModule'
import { Manager } from '@/types/Manager'

@Component({
  inheritAttrs: false,
  components: { ManagerAvatars },
})
export default class TaskManagerAvatars extends Vue {
  @Inject('ManagerModule')
  managerModule!: ManagerModule

  @Prop({ type: Array, required: true })
  selectedUids!: string[]

  get managers(): Manager[] {
    return Object.values(this.managerModule.managersCollection)
  }
}
</script>
