<template>
  <nuxt-link :href="target" target="_self">
    <slot />
  </nuxt-link>
</template>

<script setup lang="ts">
import UrlUtils from '~/services/utils/urlUtils'

const runtimeConfig = useRuntimeConfig()

const props = defineProps({
  href: {
    type: String,
    required: true,
  },
})

const target = computed(() => {
  return UrlUtils.join(
    runtimeConfig.public.agendaBaseUrl as string,
    props.href as string
  )
})
</script>

<style scoped lang="scss"></style>
