import { EmbedBuilder } from "@discordjs/builders";
import getEmojiByName from "./getEmojiByName.js";

const colors = {
    Danger: 0xf27878,
    Warning: 0xf2d478,
    Success: 0x68d49e
};

class EmojiEmbed extends EmbedBuilder {
    _title = "";
    _emoji: string | null = null;

    _generateTitle() {
        if (this._emoji) { return `${getEmojiByName(this._emoji)} ${this._title}`; }
        return this._title;
    }

    override setTitle(title: string) {
        this._title = title;
        super.setTitle(this._generateTitle());
        return this;
    }
    setEmoji(emoji: string) {
        this._emoji = emoji;
        super.setTitle(this._generateTitle());
        return this;
    }
    setStatus(color: "Danger" | "Warning" | "Success") {
        this.setColor(colors[color]);
        return this;
    }
}


export default EmojiEmbed;
