const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');

// Game URLs for match notifications
const GAME_URLS = {
    "Big Ballers VR": "https://www.vrbattles.gg/games/Big%20Ballers%20VR",
    "Blacktop Hoops": "https://www.vrbattles.gg/games/Blacktop%20Hoops",
    "Breachers": "https://www.vrbattles.gg/games/Breachers",
    "Echo Arena": "https://www.vrbattles.gg/games/Echo%20Arena",
    "Echo Combat": "https://www.vrbattles.gg/games/Echo%20Combat",
    "Gun Raiders": "https://www.vrbattles.gg/games/Gun%20Raiders",
    "Nock": "https://www.vrbattles.gg/games/Nock",
    "VAIL": "https://www.vrbattles.gg/games/VAIL"
};

function createMatchActionRow(gameName) {
    const matchhubUrl = GAME_URLS[gameName] || "https://www.vrbattles.gg/games";

    return new ActionRowBuilder().addComponents(
        new ButtonBuilder()
            .setLabel('🎮 View Matchhub')
            .setStyle(ButtonStyle.Link)
            .setURL(matchhubUrl),
        new ButtonBuilder()
            .setLabel('🟡 Join VRBattles Discord')
            .setStyle(ButtonStyle.Link)
            .setURL('https://discord.gg/j3DKVATPGQ')
    );
}

module.exports = {
    createMatchActionRow,
    GAME_URLS
};