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

const resumeStore = useResumesStore();

function printResume() {
    exportToPdf(document.getElementById('resume')!, resumeStore.currentResumeName.value + '.pdf');
}
</script>

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