<script setup>
import { inject } from 'vue';

defineProps({
	active: {
		type: Boolean,
		default: false,
	},
});

const pageContext = inject('pageContext');
</script>

<template>
	<a
		:class="{ active: pageContext.urlPathname === $attrs.href || active }"
		rel="noopener"
	>
		<slot />
	</a>
</template>
