<template>
  <div
    class="card-block contain group cursor-pointer relative overflow-hidden"
  >
    <feed-header-misc
      :count="entity.collection_medias.length"
      type="images"
    />


    <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">
      <img
        class="w-full h-36 md:h-72 object-cover"
        :src="entity.preview"
        alt=""
      />
    </div>
  </div>
</template>


<script>
import FeedFooterMisc from '@/Shared/Feed/FooterMisc.vue'
import FeedHeaderMisc from '@/Shared/Feed/HeaderMisc.vue'
import FeedFooterBanned from '@/Shared/Feed/FooterBanned.vue'
export default {
    components: { FeedFooterMisc, FeedHeaderMisc, FeedFooterBanned },
    props: {
        entity: Object,
        user: Object,
        feed_id: Number,
    },
    emits: ['likeFeed'],
    methods: {
        likeFeed() {
            this.$emit('likeFeed')
        },
    },
}
</script>
