<script setup lang="ts">
import { useStore } from '@/composables/useStore'
const { visibleAppDownloadPopup } = useStore()

const closePopup = () => {
  const store = useStore()
  visibleAppDownloadPopup.value = false
}
</script>

<template>
  <div class="app-download-popup" v-show="visibleAppDownloadPopup">
    <div class="app-download-dialog">
      <div class="app-download-close" @click="closePopup"><IconsIconClose /></div>
      <div class="app-download-pic">
        <img src="https://webapp-pub.ezijing.com/www/pc/next/app_screen.png" />
      </div>
      <div class="app-download-content">
        <h2>探索数智世界<br />从<span>数智学堂</span>开始!</h2>
        <dl>
          <dt><img src="https://webapp-pub.ezijing.com/www/pc/next/qrcode_app.png" alt="二维码" /></dt>
          <dd>
            <h3>扫码下载APP</h3>
            <p>目前仅支持安卓系统安装，其他版本敬请期待</p>
          </dd>
        </dl>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.app-download-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;

  .app-download-dialog {
    position: relative;
    width: 1000px;
    height: 500px;
    background: #ffffff;
    box-shadow: 0px 0px 18px 1px rgba(0, 0, 0, 0.12);
    border-radius: 12px 12px 12px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff url(https://webapp-pub.ezijing.com/www/pc/next/app_download_bg.png) no-repeat;
    background-size: 100% 100%;
  }
  .app-download-close {
    position: absolute;
    top: 30px;
    right: 30px;
    cursor: pointer;
  }
  .app-download-pic {
    width: 340px;
    img {
      width: 100%;
    }
  }
  .app-download-content {
    margin-left: 76px;
    h2 {
      font-size: 36px;
      font-weight: 600;
      color: #333333;
      span {
        color: var(--main-color);
      }
    }
    dl {
      margin-top: 40px;
      display: flex;
      justify-content: center;
      align-items: center;
      dt {
        width: 114px;
        height: 114px;
        img {
          width: 100%;
          height: 100%;
        }
      }
      dd {
        h3 {
          font-size: 16px;
          font-weight: 400;
          color: #333333;
        }
        p {
          margin-top: 10px;
          font-size: 12px;
          color: #6c6c6c;
        }
      }
    }
  }
}
</style>
