<select class="progress-filter filter-select-wrapper select-wrapper np-button" style="border-radius: 8px;" onChange="filterLPs()">
    <option selected disabled hidden>All Learning Paths</option>
    <option value="a">All Learning Paths</option>
    <option value="n">Not Started</option>
    <option value="i">In Progress</option>
    <option value="c">Completed</option>
</select>

<script>
    let filterLPs = () => {
        console.log(event.target.value) //i
        let filterValue = event.target.value;
        let allLPs = document.querySelectorAll('.learning-path-card');

        console.log(allLPs);
        allLPs.forEach((lp) => {
            let lpProg = lp.dataset.progress;
            let hide = false;

            if(filterValue == 'n'){
                if(lpProg > 0){
                    hide = true;
                } 
            } else if (filterValue == 'i'){
                if(!(lpProg > 0 && lpProg < 100)){
                    hide = true;
                } 
            } else if (filterValue == 'c'){
                if(!lpProg != 100){
                    hide = true;
                }
            }

            if(hide){
                lp.style.display = 'none';
            } else {
                lp.style.display = 'block';
            }
        })
    }
</script>

<style>
  .np-progress-filter-label {
      color: rgba(255, 255, 255, 0.5);
      padding-right: 7px;
      text-transform: none;
      font-weight:500;
      font-size:0.812rem;
  }
  .filter-select-wrapper {
      position: relative;
      padding:0;
      border: 2px solid  rgba(255, 255, 255, 0.25);
      color: #fff;
      height:auto;
      text-transform: none;
      border-radius:0;
  }
  .filter-select-wrapper:hover {
      color:#fff;
  }
  .select-items {
      position: absolute;
      background-color: #062531;
      top: 105%;
      left: -2px;
      z-index: 99;
      width: 102%;
      border: 2px solid rgba(255, 255, 255, 0.25);
      border-top:none;
  }
  .select-items div {
      color: rgba(255, 255, 255, 0.5);
      border-top:none;
      cursor: pointer;
      width:100%;
      padding: 12px 16px;
    }

  .select-items div:hover {  color: rgba(255, 255, 255, 1); }
  .select-selected {
      width: 100%;
      height: 100%;
      padding: 9px 66px 9px 20px;
      position: relative;
      color:#fff;
  }
  .select-selected::after {
      content:"\f078";
      font-family: "Font Awesome 5 Pro";
      position: absolute;
      width:20px;
      height:100%;
      color:rgba(255, 255, 255, 0.5);
      right:10px;
      top:0;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size:1rem;
  }
  .select-selected::before {
      content:"";
      position: absolute;
      width:20px;
      height:100%;
      border-left:2px solid rgba(255, 255, 255, 0.25);
      right:20px;
      top:0;
  }
  .select-selected.select-arrow-active::after { transform: rotate(180deg); }
  .same-as-selected,
  .filter-select-wrapper select,
  .select-hide {
      display: none;
  }
  .mo-filter-wrapper {
      display: flex;
      justify-content: center;
      list-style: none;
      margin: 0;
      padding: 0;
  }
  .select-items div:hover, 
  .same-as-selected {
    background-color: #062531;
  }
  .bqUfwS{
  display:none !important;
  }
</style>
