import { colourableChats } from './chat-color-channels';

export function ChatColor(hex: string): string {
    return `«${hex}»`;
}

export const ChatColors = {
    white: ChatColor('FFFFFF'),
    emote: ChatColor('C2A2DA'),
    tomato: ChatColor('ff6347'),
    blueLight: ChatColor('DEF3FD'),
    grey: ChatColor('bbbbbb'),
    orangeBrown: ChatColor('FFA500'),
    yellow: ChatColor('FFFF00'),
    yellowLight: ChatColor('FFC04C'),
    green: ChatColor('33AA33'),
    orange: ChatColor('FF9900'),
    red: ChatColor('F55142'),
    cyan: ChatColor('00b7eb'),
    testerRed: ChatColor('AA0000'),
    testerBrown: ChatColor('FFBB00'),
    grad1: ChatColor('B4B5B7'),
    grad2: ChatColor('BFC0C2'),
    grad3: ChatColor('CBCCCE'),
    grad4: ChatColor('D8D8D8'),
    grad5: ChatColor('E3E3E3'),
    grad6: ChatColor('F0F0F0'),
    testerChat: ChatColor('33CCFF'),
    brown: ChatColor('A52A2A'),
    pureOrange: ChatColor('FFBB00'),
    radioActive: ChatColor('FFEC8B'),
    radioInactive: ChatColor('B5AF8F'),
    violet: ChatColor('8D8DFF'),
    adminDutyName: ChatColor('FF9900'),
    hq: ChatColor('33CCFF'),
    allDept: ChatColor('FF8282'),
    allStaff: ChatColor('40BF00'),
    govAnn: ChatColor('6495ED'),
    platinum: ChatColor('E5E7E6'),
    grey11: ChatColor('B7B5B3'),
    strongBlue: ChatColor('7e98b6'),
    lighterBlue: ChatColor('a9c4e4'),
    prisonIntercom: ChatColor('9c8d38'),
    purple: ChatColor('C18DBF'),
    news: ChatColor('10F441'),
    events: ChatColor('10c236'),
    nonemergency: ChatColor('f0da2c'),
    gold: ChatColor('ecbf32'),
    adminRed: ChatColor('ff0000'),
    /**
     * Used with `ChatSystem.TestCustomColour` to test for /chatcolours settings
     * @param fallback the ChatColor string to use if the player has no custom colour
     * @param channel the chat channel to check, i.e. "admin chat" or "inactive radio"
     */
    custom(fallback: string, channel: keyof typeof colourableChats): string {
        return fallback + ChatColor('000000') + channel + `↔`;
    },
};

export const ChatColorsInt = {
    white: 0xffffff,
    greyDark: 0x888888,
    emote: 0xc2a2da,
    emoteDark: 0x3d3245,
    lightFade: 0xe6e6e6,
    darkFade: 0x6e6e6e,
    orangeBrown: 0xffa500,
    greenBrown: 0x9c8d38,
};
