/**
 * plugins/vuetify.ts
 *
 * Framework documentation: https://vuetifyjs.com`
 */

// Styles
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'

// Composables
import { createVuetify, type ThemeDefinition } from 'vuetify'

const darkTheme: ThemeDefinition = {
  dark: true,
  colors: {
    background: '#0f1419',
    surface: '#1a1f2e',
    'surface-variant': '#242b3d',
    primary: '#3b82f6',
    secondary: '#609926',
    error: '#ef4444',
    warning: '#f59e0b',
    info: '#3b82f6',
    success: '#22c55e',
    'on-background': '#f9fafb',
    'on-surface': '#f9fafb',
    'on-primary': '#ffffff',
  },
}

const lightTheme: ThemeDefinition = {
  dark: false,
  colors: {
    background: '#ffffff',
    surface: '#f9fafb',
    'surface-variant': '#f3f4f6',
    primary: '#3b82f6',
    secondary: '#609926',
    error: '#ef4444',
    warning: '#f59e0b',
    info: '#3b82f6',
    success: '#22c55e',
    'on-background': '#111827',
    'on-surface': '#111827',
    'on-primary': '#ffffff',
  },
}

// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify({
  theme: {
    defaultTheme: 'darkTheme',
    themes: {
      darkTheme,
      lightTheme,
    },
  },
  defaults: {
    VBtn: {
      variant: 'flat',
    },
    VCard: {
      rounded: 'lg',
    },
    VChip: {
      rounded: 'lg',
    },
  },
})
