<template>
  <div class="navbar">
    <hamburger
      :is-active="!SidebarStore.isCollapse"
      class="hamburger-container"
      @toggleClick="SidebarStore.toggleIsCollapse"
    />
    <breadcrumb class="breadcrumb-container" />
  </div>
</template>

<script>
import { defineComponent } from "@vue/composition-api";
import Breadcrumb from '@/components/Breadcrumb/index.vue'
import Hamburger from '@/components/Hamburger/index.vue'
import { useSidebarStore } from '@/stores/sidebar'

export default defineComponent({
  components: {
    Breadcrumb,
    Hamburger
  },
  setup() {
    const SidebarStore = useSidebarStore()
    return {
      SidebarStore
    }
  }
})
</script>

<style lang="scss" scoped>
.navbar {
  height: 50px;
  overflow: hidden;
  position: relative;
  background: transparent;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);

  .hamburger-container {
    line-height: 46px;
    height: 100%;
    float: left;
    cursor: pointer;
    transition: background 0.3s;
    -webkit-tap-highlight-color: transparent;

    &:hover {
      background: rgba(0, 0, 0, 0.025);
    }
  }

  .breadcrumb-container {
    float: left;
  }
}
</style>
