function place_bet_high(betArray, amount)
{
    betArray.set("19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36",[amount,"zero",1]);

    placeBet(betArray);
}
function place_bet_dozen1(betArray, amount)
{
    betArray.set("1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12",[amount,"outside_dozen",2]);

    console.log("Bet placed on Dozen 1");

    placeBet(betArray);
}

function place_bet_dozen2(betArray, amount)
{
    betArray.set("13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24",[amount,"zero",2]);

    placeBet(betArray);
}
function place_bet_dozen3(betArray, amount)
{
    betArray.set("25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36",[amount,"zero",2]);

    placeBet(betArray);
}

  function setChips(detail, tag='No Tag') {

    console.log("DETAIL: ",detail);
    console.log("TAG: ",tag);
    // Deselect any active chip
    const chip = document.querySelector('.cdChipActive');
    if (chip) chip.click();

    var component = null;


    if(tag==="Dozen1" || tag==="Dozen 1")
    {
        component = document.getElementById('dozen1');
        component.click();
        return;
    }
        if(tag==="Dozen2" || tag==="Dozen 2")
    {
        component = document.getElementById('dozen2');
        component.click();
        return;
    }
        if(tag==="Dozen3" || tag==="Dozen 3")
    {
        component = document.getElementById('dozen3');
        component.click();
        return;
    }
        if(tag==="Row 1" || tag==="Row1")
    {
        component = document.getElementById('row1');
        component.click();
        return;
    }
        if(tag==="Row 2" || tag==="Row2")
    {
        component = document.getElementById('row2');
        component.click();
        return;
    }    
        if(tag==="Row 3" || tag==="Row3")
    {
        component = document.getElementById('row3');
        component.click();
        return;
    }
    if(tag==="Low")
    {
        component = document.getElementById('1to18');
        component.click();
        return;
    }
    if(tag==="High")
    {
        component = document.getElementById('19to36');
        component.click();
        return;
    }
    if(tag==="Even")
    {
        component = document.getElementById('outsideEven');
        component.click();
        return;
    }
    if(tag==="Odd")
    {
        component = document.getElementById('outsideOdd');
        component.click();
        return;
    }
        if(tag==="Red")
    {
        component = document.getElementById('outsideRed');
        component.click();
        return;
    }
    if(tag==="Black")
    {
        component = document.getElementById('outsideBlack');
        component.click();
        return;
    }
    if(tag==="Pattern")
    {
        return;
    }

if (["Splits", "Quads", "Streets","DoubleStreet","Straight"].includes(tag)) {
    const values = Array.isArray(detail) ? detail.join(', ') : detail;
    const component = document.querySelector(`[data-values="${values}"]`);
    if (component) component.click();
    return;
}

 if (Array.isArray(detail)) {
        detail.forEach(num => {
            const component = document.querySelector(`[data-values="${num}"]`);
            if (component) component.click();
        });
    } else {
        const component = document.querySelector(`[data-values="${detail}"]`);
        if (component) component.click();
    }
   
}