<template>
  <scale-screen
      width="1920"
      height="1080"
      :delay="500"
      :fullScreen="true"
      :boxStyle="{
      background: '#03050C',
      overflow: isScale ? 'hidden' : 'auto',
    }"
      :wrapperStyle="wrapperStyle"
      :autoScale="isScale"
  >
    <div class="home-content-wrap">
      <Headers @changeDate="changeDate"/>
      <Container :dateArray="dateArray"/>
    </div>
  </scale-screen>
</template>
<script setup lang="ts" name="home">
import {defineAsyncComponent, ref} from "vue";
import {useSettingStore} from "@/stores/setting";
import {storeToRefs} from "pinia";

const ScaleScreen = defineAsyncComponent(() => import('@/components/scale-screen'));
const Headers = defineAsyncComponent(() => import('@/views/home/header.vue'));
const Container = defineAsyncComponent(() => import('@/views/home/container.vue'));

const settingStore = useSettingStore();
const {isScale} = storeToRefs(settingStore);
const wrapperStyle = {};
const dateArray = ref([]);
const changeDate = (date: any[]) => {
  dateArray.value = date;
};
</script>

<style scoped lang="scss">
.home-content-wrap {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background-image: url("@/assets/img/home/bg.png");
  background-size: 100% 100%;
}
</style>