<script>
  export default {
    data () { return { active: false } },
    methods: { toggle () { this.active = !this.active } },
    props: [ 'page' ]
  }
</script>

<template>
  <div class="navbar">
    <div class="dropdown">
      <a @click="toggle" class="toggle">{{ page }}<span class="icon-chevron-down"></span></a>
      <div v-if="active" class="links">
        <NuxtLink href="/legal/privacy">Privacy Policy</NuxtLink>
        <NuxtLink href="/legal/terms">User Agreement</NuxtLink>
        <NuxtLink href="/legal/content">Content Policy</NuxtLink>
        <NuxtLink href="/legal/impressum">Impressum</NuxtLink>
      </div>
    </div>
  </div>
</template>