<template>
  <div class="bg-white md:min-w-bodySet mx-auto">
    <div class="banner bg-gradient-to-r from-white to-bannerBgEndColor">
      <div class="w-bodySet mx-auto pt-24 flex items-center">
        <div class="w-1/2 pl-36 py-36">
          <div class="text-4xl font-semibold text-headerMain">企业级溯源系统</div>
          <div
            class="text-base text-contentMain mt-5"
          >基于区块链技术的存证溯源服务系统，面向企业和政府部门提供支持数据上链、流程化办公、任务协同、资产数字化的高级版存证溯源服务。</div>
          <div class="flex flex-row mt-6">
            <MainButton size="large" text="立即体验" />
          </div>
        </div>
        <div class="w-1/2 pl-20">
          <img :src="getImgUrl('companyBanner')" />
        </div>
      </div>
    </div>
    <div class="product pb-12">
      <div class="text-center text-gray-800 text-3xl font-medium py-10">产品优势</div>
      <div class="flex flex-row flex-wrap w-6/12 mx-auto">
        <div v-for="item in productsList" :key="item.id" class="w-1/3 px-8 py-4">
          <svg-icon :iconClass="item.icon" class="w-14 h-14 mx-auto" />
          <div class="text-base text-gray-800 font-semibold text-center pt-1">{{ item.title }}</div>
          <div class="text-sm text-gray-500 text-justify pt-3">{{ item.detail }}</div>
        </div>
      </div>
    </div>
    <div class="functions">
      <div class="text-center text-gray-800 text-3xl font-medium pt-10">产品功能</div>

      <div
        v-for="item in functionList"
        :key="item.id"
        class="pb-20 pt-10"
        :class="item.id % 2 == 0 ? ' bg-white' : ' bg-gray-50 '"
      >
        <div
          class="flex items-center w-7/12 mx-auto justify-between"
          :class="item.id % 2 == 0 ? ' flex-row' : ' flex-row-reverse'"
        >
          <img :src="getImgUrl(item.icon)" class="w-1/2" />
          <div class="w-1/3">
            <div class=" text-xl text-gray-800 font-semibold">{{ item.title }}</div>
            <div class=" text-sm text-gray-500 pt-4 text-justify">{{ item.detail }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import MainButton from '@/components/mainButton.vue';
import { computed } from 'vue';
import { productsList, functionList } from '@/context/company'
const getImgUrl = computed(() => {
  return (url: string) => {
    return require(`@/assets/${url}.png`)
  }
})
</script>