let mix = require('laravel-mix');

mix.less('resources/assets/_less/adminlte/admin-lte.less', 'resources/assets/css/admin-lte.css')
  .options({ processCssUrls: false });

mix.styles([
    'node_modules/apexcharts/dist/apexcharts.css',
    'node_modules/select2/dist/css/select2.css',
    'node_modules/switchery-latest/dist/switchery.css',
    'node_modules/daterangepicker/daterangepicker.css',
    'node_modules/rangeslider.js/dist/rangeslider.css',
    'node_modules/multiselect/css/multi-select.css',
    // jQuery UI
    'resources/assets/css/admin-lte.css',
    'node_modules/summernote/dist/summernote-lite.css'
], 'assets/ignite/css/core/core.css');

// Core Module: AdminLTE
mix.scripts([
    'node_modules/jquery/dist/jquery.js',
    'node_modules/select2/dist/js/select2.js',
    'node_modules/bootstrap/dist/js/bootstrap.js',
    'node_modules/apexcharts/dist/apexcharts.js',
    'node_modules/switchery-latest/dist/switchery.js',
    'node_modules/admin-lte/build/js/BoxRefresh.js',
    'node_modules/admin-lte/build/js/BoxWidget.js',
    'node_modules/admin-lte/build/js/ControlSidebar.js',
    'node_modules/admin-lte/build/js/PushMenu.js',
    'node_modules/admin-lte/build/js/Tree.js',
    'node_modules/admin-lte/build/js/Layout.js',
    'node_modules/jquery-validation/dist/jquery.validate.js',
    'node_modules/multiselect/js/jquery.multi-select.js',
    'node_modules/moment/moment.js',
    'node_modules/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js',
    'node_modules/bootstrap-datepicker/js/bootstrap-datepicker.js',
    'node_modules/bootstrap-filestyle/src/bootstrap-filestyle.js',
    'node_modules/daterangepicker/daterangepicker.js',
    'node_modules/rangeslider.js/dist/rangeslider.js',
    'node_modules/sortablejs/Sortable.js',
    'node_modules/alpinejs/dist/alpine-ie11.js',
    'node_modules/summernote/dist/summernote-lite.js',
    'resources/assets/js/summernote/plugins/MediaManager.js',
    'resources/assets/js/summernote/plugins/ImageAttributes.js',
    'resources/assets/js/admin.js',
    'resources/assets/js/ignite.js',
    'resources/assets/js/core.js'
], 'assets/ignite/js/core/core.js').vue();

mix.copyDirectory('node_modules/summernote/dist/font', 'assets/ignite/css/core/font');

// Core Module: DataTables Javascript and Plugins
mix.scripts([
    'node_modules/datatables.net/js/jquery.dataTables.js',
    'node_modules/datatables.net-bs/js/dataTables.bootstrap.js',
    'node_modules/datatables.net-buttons/js/dataTables.buttons.js',
    'node_modules/datatables.net-buttons-bs/js/buttons.bootstrap.js',
    'node_modules/datatables.net-buttons/js/buttons.colVis.js',
    'node_modules/datatables.net-buttons/js/buttons.html5.js',
    'node_modules/datatables.net-buttons/js/buttons.print.js',
    'node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.js',
    'node_modules/datatables.net-select/js/dataTables.select.js',
    'node_modules/jquery-datatables-checkboxes/js/dataTables.checkboxes.js',
    'resources/assets/js/datatables.buttons.server-side.js',
    'resources/assets/js/datatables.buttons.js',
    'resources/assets/js/datatables.delete-entry.js'
], 'assets/ignite/js/core/datatables.js').vue();

// Core Module: DataTables CSS and Plugins
mix.styles([
    'node_modules/datatables.net-bs/css/dataTables.bootstrap.css',
    'node_modules/datatables.net-rowgroup-bs/css/rowGroup.bootstrap.css',
    'node_modules/datatables.net-buttons-bs/css/buttons.bootstrap.css',
    'node_modules/datatables.net-select-dt/css/select.dataTables.css'
], 'assets/ignite/css/core/datatables.css');

// CMS Vue: Page List
mix.js('resources/assets/js/import.js', 'assets/ignite/js/import').vue();
