import type { RegionalName } from '$lib/regional-name'
import globalJSON from '../../../../global/character.json'

/**
 * Character definitions.
 */
export interface Character {
	/**
	 * Character ID.
	 */
	chara_id: number
	/**
	 * Regional name of the character.
	 * E.g., Special Week for Global, or スペシャルウィーク for JP.
	 */
	name: string
}

export const character = {
    global: globalJSON as Character[],
}

export const charaNames = globalJSON.reduce((m, c) => m.set(c.chara_id, {en: c.name}), new Map<Character['chara_id'], RegionalName>());
