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

mix.options({ processCssUrls: false });
mix.setPublicPath('packages/sartoric/modular-cms/src/assets');

mix.js('packages/sartoric/modular-cms/src/resources/assets/js/custom-select2.js', 'js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/anchor-delete.js', 'js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/custom-fix.js', 'js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/custom-pwdstrength.js', 'js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/custom-bootstraplength.js', 'js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/custom-dashboard.js', 'js');

mix.js('packages/sartoric/modular-cms/src/resources/assets/js/layout.js', 'layouts/layout/scripts/layout.min.js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/cookie-consent.js', 'layouts/layout/scripts/cookie-consent.min.js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/hor-timeline.js', 'layouts/layout/scripts/hor-timeline.min.js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/quick-nav.js', 'layouts/layout/scripts/quick-nav.min.js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/quick-sidebar.js', 'layouts/layout/scripts/quick-sidebar.min.js')
    .js('packages/sartoric/modular-cms/src/resources/assets/js/table-bootstrap.js', 'layouts/layout/scripts/table-bootstrap.min.js');

mix.sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/bootstrap.scss', 'global/plugins/bootstrap/css/');

// global theme stylesheet compilation
mix.sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/global/components.scss', 'global/css/components.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/global/components-md.scss', 'global/css/components-md.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/global/components-rounded.scss', 'global/css/components-rounded.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/global/plugins.scss', 'global/css/plugins.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/global/plugins-md.scss', 'global/css/plugins-md.min.css');

mix.sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/apps/inbox.scss','apps/css/inbox.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/apps/ticket.scss','apps/css/ticket.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/apps/todo.scss','apps/css/todo.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/apps/todo-2.scss','apps/css/todo-2.min.css');


mix.sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/about.scss', 'pages/css/about.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/blog.scss', 'pages/css/blog.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/coming-soon.scss', 'pages/css/coming-soon.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/contact.scss', 'pages/css/contact.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/error.scss', 'pages/css/error.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/faq.scss', 'pages/css/faq.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/image-crop.scss', 'pages/css/image-crop.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/invoice.scss', 'pages/css/invoice.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/invoice-2.scss', 'pages/css/invoice-2.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/lock.scss', 'pages/css/lock.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/login.scss', 'pages/css/login.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/portfolio.scss', 'pages/css/portfolio.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/pricing.scss', 'pages/css/pricing.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/profile.scss', 'pages/css/profile.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/profile-2.scss', 'pages/css/profile-2.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/search.scss', 'pages/css/search.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/pages/tasks.scss', 'pages/css/tasks.min.css');

// theme layouts compilation
mix.sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/layouts/layout/layout.scss', 'layouts/layout/css/layout.min.css');

mix.sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/layouts/layout/themes/blue.scss', 'layouts/layout/css/themes/blue.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/layouts/layout/themes/darkblue.scss', 'layouts/layout/css/themes/darkblue.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/layouts/layout/themes/default.scss', 'layouts/layout/css/themes/default.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/layouts/layout/themes/grey.scss', 'layouts/layout/css/themes/grey.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/layouts/layout/themes/light.scss', 'layouts/layout/css/themes/light.min.css')
    .sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/layouts/layout/themes/light2.scss', 'layouts/layout/css/themes/light2.min.css');

// CUSTOM CSS
mix.sass('packages/sartoric/modular-cms/src/resources/assets/sass/metronic/layouts/layout/custom.scss', 'layouts/layout/css/custom.min.css');

//LOGO PLACEHOLDER
mix.copy('packages/sartoric/modular-cms/src/resources/assets/images/logobig.png','packages/sartoric/modular-cms/src/assets/pages/images/logobig.png');
mix.copy('packages/sartoric/modular-cms/src/resources/assets/images/logosmall.png','packages/sartoric/modular-cms/src/assets/pages/images/logosmall.png');
mix.copy('packages/sartoric/modular-cms/src/resources/assets/images/avatar.png','packages/sartoric/modular-cms/src/assets/pages/images/avatar.png');
