<template>
  <div class="logo-container-vertical">
    <router-link to="/">
      <span class="logo">
        <img :src="url" />
      </span>
      <span class="title">
        {{ title }}
      </span>
    </router-link>
  </div>
</template>
<script>
import { mapGetters } from 'vuex';

export default {
  name: 'VabLogo',
  data() {
    const url = require('@/assets/logo.png');
    return {
      url: url,
    };
  },
  computed: {
    ...mapGetters({
      logo: 'settings/logo',
      title: 'settings/title',
    }),
  },
};
</script>
<style lang="scss" scoped>
@mixin container {
  position: relative;
  height: $base-top-bar-height;
  overflow: hidden;
  line-height: $base-top-bar-height;
  background: transparent;
}

@mixin logo {
  display: inline-block;
  width: 32px;
  height: 32px;
  color: $base-title-color;
  vertical-align: middle;
}

@mixin title {
  display: inline-block;
  overflow: hidden;
  font-size: 18px;
  line-height: 55px;
  color: $base-title-color;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.logo-container-vertical {
  @include container;

  height: $base-logo-height;
  line-height: $base-logo-height;
  text-align: center;

  .logo {
    svg,
    img {
      @include logo;
    }
  }

  .title {
    @include title;
    max-width: calc(#{$base-left-menu-width} - 60px);
  }
}
</style>
