window.onChangeTriggerEvent = function()
{
    const allEvent    = $('#triggerEvent0').is(':checked');
    const customEvent = $('#triggerEvent1').is(':checked');

    setTimeout(function()
    {
        if(allEvent)    $('#customEvent').addClass('hidden');
        if(customEvent) $('#customEvent').removeClass('hidden');
    }, 100)
};

window.loadRequireMinimumCount = function()
{
    if($('[name=require_minimum_count]').is(':checked'))
    {
        $('[name=require_minimum_count_number]').closest('.form-group').removeClass('hidden');
    }
    else
    {
        $('[name=require_minimum_count_number]').closest('.form-group').addClass('hidden');
    }
};

window.loadRequireIdentifiers = function()
{
    if($('[name=require_identifiers]').is(':checked'))
    {
        $('[name^=pipeline]').closest('.form-group').removeClass('hidden');
    }
    else
    {
        $('[name^=pipeline]').closest('.form-group').addClass('hidden');
    }
};

window.loadStrategiesAllowed = function()
{
    if($('[name=strategies_allowed]').is(':checked'))
    {
        $('[name^=mergeType]').closest('.form-group').removeClass('hidden');
    }
    else
    {
        $('[name^=mergeType]').closest('.form-group').addClass('hidden');
    }
};
