import type { ThemeDefinition } from 'vuetify'
import packageJSON from './package.json'

interface TitleConfig {
  full: string
  short: string
}

interface BuildConfig {
  date?: string
  version: string
}

interface ThemeConfig {
  file: string
  cookie: string
  default: string
  light: string
  dark: string
  themes: Record<string, ThemeDefinition>
}

type config = {
  url: string
  shortener: string
  name: string
  title: TitleConfig
  description: string
  locale: string
  build: BuildConfig
  theme: ThemeConfig
}

export default {
  url: 'https://enderman.ch',
  shortener: 'https://go.enderman.ch',
  name: packageJSON.name || 'app',
  title: {
    full: "Enderman's Website",
    short: 'Enderman',
  },
  description:
    'A software engineer, a malware enthusiast and, most importantly, a weird tall creature. I have over 300K subscribers on YouTube and over 20K followers on Twitter.',
  locale: 'en',
  build: {
    date: new Date().toISOString().split('T')[0],
    version: packageJSON.version || '0.0.0',
  },
  theme: {
    file: './assets/styles/vuetify.scss',
    cookie: 'color-scheme',
    default: 'chocolate',
    light: 'vanilla',
    dark: 'chocolate',
    themes: {
      vanilla: {
        dark: false,
        colors: {
          background: '#FFFFFF',
          surface: '#FFFFFF',
          primary: '#6200EE',
          'primary-darken-1': '#3700B3',
          secondary: '#03DAC6',
          'secondary-darken-1': '#018786',
          error: '#B00020',
          info: '#2196F3',
          success: '#4CAF50',
          warning: '#FB8C00',
        },
      },
      chocolate: {
        dark: true,
        colors: {
          background: '#000',
          surface: '#000',
          primary: '#795548',
          'primary-darken-1': '#5D4037',
          secondary: '#FF9800',
          'secondary-darken-1': '#F57C00',
          error: '#B00020',
          info: '#2196F3',
          success: '#4CAF50',
          warning: '#FB8C00',
        },
      },
    },
  },
} satisfies config as config
