<script setup lang="ts">
import { Resume } from '@/types/resume';
import Button from '../ui/button/Button.vue';
import { exportToPdf } from '@/lib/pdfExport';
import { FileText } from 'lucide-vue-next';

const props = defineProps<{
    resume: Resume,
}>();

function printResume() {
    exportToPdf(document.getElementById('resume')!, (props.resume.name || 'Sans titre') + '.pdf');
}
</script>

<template>
   <Button variant="outline" class="cursor-pointer" @click="printResume"><FileText />Exporter le CV</Button>
</template>
