<template>
  <nuxt-link v-if="instation" :to="path">{{content}}</nuxt-link>
  <a :href="path" :target="target" v-else>{{content}}</a>
</template>

<script>
  export default {
    name:  'mta-link',
    props: {
      path:      {
        required: true,
        type: String,
        default:  '/',
      },
      instation: {
        type: Boolean,
        default: true
      },
      target: {
        type: String,
        default: '_self',
        validator: function(value) {
          return ['_blank', '_self', '_parent', '_top'].indexOf(value) !== -1
        }
      },
      content: {
        type: String,
        required: true
      }
    },
    created() {
      console.log(this.path);
    },
  };
</script>

<style scoped>

</style>
