<template>
  <page-meta>
    <navigation-bar v-bind="originNavBarStyle" />
  </page-meta>
  <slot></slot>
</template>

<script setup lang="ts">
  import { useAppStore } from '@/stores/modules/appStore'

  defineOptions({ name: 'Sys' })

  const appStore = useAppStore()
  const originNavBarStyle = computed(() => {
    if (appStore.isDark) {
      return {
        frontColor: '#ffffff',
        backgroundColor: '#1a1a1a',
        animation: {
          duration: 0,
          timingFunc: 'easeIn',
        },
      }
    } else {
      return {
        frontColor: '#000000',
        backgroundColor: '#f8f8f8',
        animation: {
          duration: 0,
          timingFunc: 'easeIn',
        },
      }
    }
  })
</script>
