<template>
  <div class="mx-auto md:w-bodySet blockChain min-w-1200 relative flow-root">
    <img
      :src="ccImg"
      alt=""
      class="ccImg"
      style="
        width: 1920px;
        height: 1265px;
        position: absolute;
        top: -658px;
        right: -631px;
      "
    />
    <div class="stone"></div>
    <ChainCard :msgList="msgList" class="chainCard"></ChainCard>
    <ChainTitle class="chain-title" />
    <div class="blue-card"></div>
    <chain-search
      class="chain-search"
      style="width: 600px;"
      :value="value"
      :setValue="setValue"
      :clickSearch="clickSearch"
    />
    <ChainOverview
      :totalTx="totalTx"
      :quoteChange="quoteChange"
      :price="price"
      :marketValue="marketValue"
      :speed="speed"
      :tps="tps"
      :addressNumber="addressNumber"
    />
    <div class="flex justify-between mt-14" style="margin-bottom: 60px;">
      <latest-block :latestBlocks="latestBlocks"></latest-block>
      <latest-tx :latestTxs="latestTxs"></latest-tx>
    </div>
  </div>
</template>

<script lang="ts">
import VueTypedMixins from 'vue-typed-mixins'
import ChainCard from '@/components/pc/BlockChainBrowser/ChainOverview/ChainCard.vue'
import ChainTitle from '@/components/pc/BlockChainBrowser/ChainTitle.vue'
import ChainSearch from '@/components/pc/BlockChainBrowser/ChainSearch.vue'
import ChainOverview from '@/components/pc/BlockChainBrowser/ChainOverview/index.vue'
import LatestBlock from '@/components/pc/BlockChainBrowser/LatestBlock/index.vue'
import LatestTx from '@/components/pc/BlockChainBrowser/LatestTx/index.vue'
import ccImg from '@/assets/images/blockChainBrowser/cc-image.png'
import blockChainBrowserMixin from '@/mixin/blockChainBrowser'

export default VueTypedMixins(blockChainBrowserMixin).extend({
  components: {
    ChainCard,
    ChainTitle,
    ChainSearch,
    ChainOverview,
    LatestBlock,
    LatestTx,
  },
  data() {
    return {
      ccImg,
    }
  },
})
</script>

<style scoped>
.blockChain {
  padding-top: 64px;
}
.ccImg {
  animation-name: rotate;
  animation-fill-mode: forwards;
  animation-duration: 1.2s;
  animation-timing-function: ease;
}

.chainCard {
  position: absolute;
  z-index: 6;
  top: 170px;
  animation-name: slideIn;
  animation-duration: 1.2s;
  animation-delay: 0.5s;
  animation-fill-mode: forwards;
  opacity: 0;
  animation-timing-function: ease;
  margin-left: -100px;
}
.chain-title {
  position: absolute;
  top: 240px;
  left: 575px;
}
.chain-search {
  position: absolute;
  z-index: 6;
  top: 540px;
  left: 572px;
  animation-name: slideUp2;
  animation-duration: 1.5s;
  animation-timing-function: ease;
  animation-delay: 1s;
  opacity: 0;
  animation-fill-mode: forwards;
}
.stone {
  height: 832px;
}
.blue-card {
  position: absolute;
  z-index: 5;
  top: 0px;
  left: 197px;
  width: 600px;
  height: 840px;
  background: #2545cb;
  animation-name: slideDown;
  animation-duration: 1.7s;
  animation-timing-function: ease;
}
</style>
<style>
@keyframes rotate {
  from {
    transform: rotate(0);
    opacity: 0;
  }
  to {
    transform: rotate(90deg);
    opacity: 1;
    top: -453px;
    right: -1006px;
  }
}
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translate(0);
    opacity: 1;
  }
}
@keyframes slideUp2 {
  from {
    transform: translateY(147px);
    opacity: 0;
  }
  to {
    transform: translate(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
    margin-left: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
</style>
