<script setup lang="ts">
const route = useRoute()

const repoBase = 'https://git.federspiel.tech/flfeders/FEDEO/src/branch/dev/docs'

const sourceUrl = computed(() => {
  if (route.path === '/') {
    return `${repoBase}/README.md`
  }
  return `${repoBase}${route.path}.md`
})
</script>

<template>
  <UButton
    color="neutral"
    variant="outline"
    icon="i-lucide-file-text"
    label="Quellseite"
    :to="sourceUrl"
    target="_blank"
  />
</template>
