type Config = {
  dbPath: string
  channelId: string
  discordClientId: string
  dataDir: string
  giteaToDiscordUserMappings: Record<string, string>
}

const devConfig: Config = {
  dbPath: ".//local-spike.db",
  channelId: "1384275245174620370",
  discordClientId: "1384271480119885977",
  dataDir: "/Users/corey/code/tmp/data",
  giteaToDiscordUserMappings: {
    probablycorey: "corey",
  },
}

const prodConfig: Config = {
  dbPath: `${process.env.DATA_DIR}/spike.db`,
  channelId: "1436392275696554055",
  discordClientId: "1382067546651365416",
  dataDir: "/var/data",
  giteaToDiscordUserMappings: {
    probablycorey: "corey",
    defunkt: "defunkt",
  },
}

const config = process.env.NODE_ENV === "production" ? prodConfig : devConfig

export function getConfig<K extends keyof Config>(key: K) {
  return config[key]
}
