<template>
  <div
    class="card-block contain group cursor-pointer relative overflow-hidden"
  >
    <feed-header-misc
      :count="entity.collection_medias.length"
      type="videos"
    />
    <feed-footer-misc
      v-if="entity.status == 1"
      :is_like="entity.liked"
      :likes="entity.likes"
      :comments="entity.comments"
      :count="entity.views_count"
      :ads="entity.is_ads"
      @like-feed="likeFeed"
    />
    <feed-footer-banned v-else />

    <div class="relative overflow-hidden">
      <feed-preview class="w-full h-36 md:h-72 object-cover" :source="entity.preview" />
    </div>
  </div>
</template>


<script>
import FeedFooterMisc from '@/Shared/Feed/FooterMisc.vue'
import FeedHeaderMisc from '@/Shared/Feed/HeaderMisc.vue'
import FeedPreview from '@/Shared/Feed/FeedPreview.vue'
import FeedFooterBanned from '@/Shared/Feed/FooterBanned.vue'

export default {
    components: { FeedFooterMisc, FeedHeaderMisc, FeedPreview, FeedFooterBanned },
    props: {
        entity: Object,
        user: Object,
        feed_id: Number,
    },
    emits: ['likeFeed'],
    methods: {
        likeFeed() {
            this.$emit('likeFeed')
        },
    },
}
</script>
