<template>
  <div class="logo">
    <router-link :to="{name:'index'}">
      <!-- <LogoSvg alt="logo" /> -->
      <!-- <img :src="LogoSvg" /> -->
      <img :src="logo" alt="logo" />
      <h1 v-if="showTitle">{{ title }}</h1>
    </router-link>
  </div>
</template>

<script>
import LogoSvg from '@/assets/logo.png'

export default {
  name: 'Logo',
  components: {
    // LogoSvg
  },
  props: {
    title: {
      type: String,
      default: process.env.VUE_APP_PRO_NAME,
      required: false
    },
    showTitle: {
      type: Boolean,
      default: true,
      required: false
    }
  },
  data () {
    return {
      LogoSvg: LogoSvg,
      logo: require(process.env.VUE_APP_LOGO) //  logo
    }
  }
}
</script>
