<script lang='ts' setup>
import dayjs from 'dayjs'

defineProps({
  item: Object as any,
})
const router = useRouter()

async function openFeaturedDetail(item: any) {
  // 在线画册
  router.push({
    path: `/collections/${item.slug}`,
  })
}
</script>

<template>
  <div class="pos-relative cursor-pointer" @click="openFeaturedDetail(item)">
    <img :src="item.thumbnailUrl" alt="" srcset="" class="w-680px b-rd-14px h-385px object-cover mr-100px">
    <div class="mt-28px">
      <div class="text-32px fw-700 line-clamp-2 text-#363C40 lh-40px custom-title-font">
        {{ item.title }}
      </div>
      <div class="flex mt-20px mb-24px text-#7C7C7C text-18px">
        <div class="mr-48px">
          {{ dayjs(item.createTime).format('MMMM D, YYYY') }}
        </div>
      </div>
      <div class="text-18px lh-24px line-clamp-1 text-#666">
        {{ item.headImageText }}
      </div>
    </div>
  </div>
</template>
