ById('addSelectedButtonText');
        
        if (button && buttonText) {
            const count = window.selectedDevicesForCase ? window.selectedDevicesForCase.length : 0;
            
            if (count > 0) {
                button.style.display = 'inline-flex';
                buttonText.textContent = `Add Selected (${count})`;
            } else {
                button.style.display = 'none';
                buttonText.textContent = 'Add Selected';
            }
        }
    }

    </script>
</