()
| 956 | } |
| 957 | |
| 958 | function updateSelectionState() { |
| 959 | const items = document.querySelectorAll('.results-item'); |
| 960 | items.forEach((item, index) => { |
| 961 | const checkbox = item.querySelector('input[type="checkbox"]'); |
| 962 | if (state.selectedFiles.has(index)) { |
| 963 | item.classList.add('selected'); |
| 964 | checkbox.checked = true; |
| 965 | } else { |
| 966 | item.classList.remove('selected'); |
| 967 | checkbox.checked = false; |
| 968 | } |
| 969 | }); |
| 970 | updateSelectionButtons(); |
| 971 | } |
| 972 | |
| 973 | function updateSelectionButtons() { |
| 974 | const hasSelection = state.selectedFiles.size > 0; |
no test coverage detected