// resources/js/app.js
import 'bootstrap';
import $ from 'jquery';
import 'admin-lte/dist/js/adminlte.min.js';
import 'admin-lte/dist/css/adminlte.min.css';


import DataTable from 'datatables.net-bs5';
import 'datatables.net-buttons-bs5';
import JSZip from 'jszip';
import pdfMake from 'pdfmake/build/pdfmake';
import pdfFonts from 'pdfmake/build/vfs_fonts';
window.JSZip = JSZip;
pdfMake.vfs = pdfFonts.pdfMake.vfs;

// Inicializar tabelas automaticamente
$(document).ready(function () {
    $('.datatable').DataTable({
        responsive: true,
        scrollX: true,
        dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ],
        language: {
            url: "//cdn.datatables.net/plug-ins/1.13.6/i18n/pt-PT.json"
        }
    });
});
