export default () => {
  document.addEventListener('DOMContentLoaded', function () {
    var selectTerms = document.getElementById('selectTerms');
    var jobItems = document.querySelectorAll('.job-item');
  
    if (selectTerms) {
      selectTerms.addEventListener('change', function () {
        var selectedCategory = selectTerms.value;
    
        jobItems.forEach(function (item) {
          if (selectedCategory === 'all' || item.getAttribute('data-category') === selectedCategory) {
            item.style.display = 'block';
          } else {
            item.style.display = 'none';
          }
        });
      });
    }
  });
};