<script setup lang="ts">
const props = defineProps<{
    dataResource?: string,
    dataTitle?: string,
}>()

const resource = computed(() => props.dataResource ?? '')
const title = computed(() => props.dataTitle ?? '')
const fileName = computed(() => `${title.value}.${resource.value.split('.').pop()}`)
</script>

<template>
    <a :href="resource" :download="fileName">{{fileName}}</a>
</template>