<template>
    <div class="information" :class="{ mobile: mobile, disabled: isPlay }">
        <!-- <component :is="page"></component> -->
        <ViewMobile />
    </div>
</template>

<script setup>
import ViewMobile from './View.Mobile.vue'
import { ref, markRaw, onMounted, computed, watch } from 'vue'
import { useApp } from '@/app'
import { useStore } from 'vuex'
const store = useStore()

const mobile = ref(false)
// const page = ref(ViewMobile)
const isPlay = computed(() => store.getters['tour/isPlay'])
useApp().then(app => {
    mobile.value = app.config.mobile
    // console.log(app.config)
    // page.value = mobile.value ? ViewMobile : ViewPc
})
</script>

<style lang="scss" scoped>
.information {
    position: absolute;
    left: 0;
    top: 20px;
    height: 34px;
    border-radius: 0 34px 34px 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: all;
    color: rgba(255, 255, 255, 0.88);
    z-index: 100;
    &.mobile {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        background: none;
        height: 0;
        &.disabled {
            // position: absolute;
        }
    }
    :deep(.icon) {
        cursor: pointer;
        display: flex;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 24px;
        align-items: center;
        justify-content: flex-start;
        color: inherit;
        i {
            font-size: 14px;
        }
    }
}
</style>
