import { createApp } from 'vue';
import PrimeVue from 'primevue/config';
import { definePreset } from '@primevue/themes';
import Aura from '@primevue/themes/aura';
import ToastService from 'primevue/toastservice';
import ConfirmationService from 'primevue/confirmationservice';
import 'primeicons/primeicons.css';

import App from './App.vue';
import router from './router.js';
import './style.css';

// ---- Medicus theme preset ----
// Ledger Navy primary + Factory Amber accent, derived from the brief's own
// world (supply-chain / manufacturing ops), not the default emerald Aura.
const MedicusPreset = definePreset(Aura, {
  semantic: {
    primary: {
      50: '#eef2f7',
      100: '#d3dce8',
      200: '#a7b9d1',
      300: '#7b96ba',
      400: '#4f73a3',
      500: '#2c527f',
      600: '#1f3452',
      700: '#1a2c45',
      800: '#152338',
      900: '#101b2b',
      950: '#0b131e',
    },
  },
});

const app = createApp(App);

app.use(PrimeVue, {
  theme: {
    preset: MedicusPreset,
    options: {
      darkModeSelector: '.medicus-dark',
      cssLayer: false,
    },
  },
});
app.use(ToastService);
app.use(ConfirmationService);
app.use(router);

app.mount('#app');
