<template>
  <div class="header-bar">
    <div class="left">
      <side-trigger :collapsed="collapsed" icon="md-menu" @on-change="handleCollpasedChange"></side-trigger>
      <custom-bread-crumb show-icon style="margin-left: 10px;" :list="breadCrumbList"></custom-bread-crumb>
    </div>
    <div class="custom-content-con">
      <slot></slot>
    </div>
  </div>
</template>
<script>
import SideTrigger from './sideTrigger/SideTrigger'
import CustomBreadCrumb from './customBreadCrumb/CustomBreadCrumb'
export default {
  name: 'HeaderBar',
  components: {
    SideTrigger,
    CustomBreadCrumb
  },
  props: {
    collapsed: Boolean
  },
  computed: {
    breadCrumbList () {
      return this.$store.state.auth.breadCrumbList
    }
  },
  mounted () {
    /* console.log(this.$store.state.auth.breadCrumbList, '11224545') */
  },
  methods: {
    handleCollpasedChange (state) {
      this.$emit('on-coll-change', state)
    }
  }
}
</script>
<style lang="less" scoped>
.header-bar {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: space-between;
  .custom-content-con {
    height: auto;
    padding-right: 20px;
    line-height: 53px;
  }
}
@media screen and (max-width: 767px) {
  .custom-bread-crumb {
    display: none;
  }
}
</style>
