<template>
  <div class="w-full">
    <div class="relative mx-auto w-wrap">
      <div class="flex items-center justify-between">
        <div class="flex items-center space-x-5">
          <img src="~/assets/img/home/home_plane.png" class="h-25 w-25" />
          <div>
            <div class="text-sm font-bold text-black-3">旅行游记</div>
            <div class="h-2 w-50 bg-primary"></div>
            <div class="text-sm text-primary">Hot items</div>
          </div>
        </div>
        <div class="flex items-center space-x-10">
          <NuxtLink
            to="/note-create-start"
            class="flex h-30 px-15 cursor-pointer items-center justify-center space-x-5 rounded-full bg-primary"
          >
            <span class="text-sm font-bold text-white">写游记</span>
            <span
              class="iconfont icon-edit-square text-white"
              style="font-size: 14px"
            ></span>
          </NuxtLink>
          <NuxtLink
            to="/travel-notes"
            class="flex h-30 px-15 cursor-pointer items-center justify-center space-x-5 rounded-full bg-primary"
          >
            <span class="text-sm font-bold text-white">了解更多</span>
            <span
              class="iconfont icon-arrow_right text-white"
              style="font-size: 14px"
            ></span>
          </NuxtLink>
        </div>
      </div>
      <div class="mt-35 grid grid-cols-2 gap-x-10 gap-y-40">
        <HomeTravelNotesItem
          v-for="item in travelNotesList"
          :key="item"
          :item-data="item"
        />
      </div>
    </div>
  </div>
</template>

<script setup>
const { data } = await useMyFetch(
  `website/tourism/projectTravelNotes/homeList?pageNum=1&pageSize=6`
);
const travelNotesList = computed(() => data.value?.dataList ?? []);
</script>

<style lang="scss" scoped></style>
