<template>
  <div class="main-layout" :class="{ 'is-fixed': isFixed }">
    <app-header />
    <div v-show="!isFixed">
      <Nuxt />
      <app-footer />
    </div>
  </div>
</template>

<script>
import AppHeader from '@/components/Header'
import AppFooter from '@/components/Footer'
export default {
  components: { AppHeader, AppFooter },
  computed: {
    isFixed() {
      const { searchVisible, menuVisible } = this.$store.state
      return searchVisible || menuVisible
    }
  }
}
</script>
