<template>
  <div class="header">
    <HeaderItems :items="items" :rightItems="rightItems" :toolMode="toolMode" />
  </div>
  <Toolbar :toolMode="toolMode" />
</template>

<script setup>
import { computed } from 'vue'
import { useViewerStore } from '@/stores/modules/viewer'

const useViewer = useViewerStore()
const items = useViewer.getActiveHeaderItems
const rightItems = useViewer.getActiveRightHeaderItems
const toolMode = computed(() => useViewer.getToolMode)
</script>

<style lang="scss">
  .header {
    position: relative;
    box-sizing: content-box;
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    padding: 0 20px;
    background-color: var(--c-header-bg);
    border-bottom: 1px solid var(--c-header-border);
    z-index: 72;
    overflow-x: auto;
    overflow-y: hidden;
  }
  @media screen and (max-width: 767.9px) {
    .header {
      padding: 10px;
    }
  }
</style>
