document.addEventListener("DOMContentLoaded", ()=>{
const bottonsResset = document.querySelectorAll('.buttom-resset-all')
const divsDropDown = document.querySelectorAll('.div-dropdown')
const hideElement = (objetoBoton,objetoDrop, objetivo)=>{
let clearButtoms = document.querySelectorAll('.wpgb-select-clear')
clearButtoms.forEach((o)=>{
o.click();
})
bottonsResset.forEach((b)=>{
b.classList.add('buttomReset_hidden')
})
divsDropDown.forEach((d)=>{
d.classList.add('buttomReset_hidden')
})
let myBottom = document.querySelector(objetoBoton)
myBottom.classList.toggle('buttomReset_hidden');
let myDrop = document.querySelector(objetoDrop)
myDrop.classList.toggle('buttomReset_hidden');
let llamaAria = ()=>{
let presionado = objetivo.parentElement.getAttribute('aria-pressed');
if(presionado=="false") objetivo.parentElement.setAttribute('aria-pressed',"true")
}
setTimeout(llamaAria, 0)
}
document.addEventListener('mouseup', (evento)=>{
let elemento = evento.target
if(elemento.classList.contains('radio-buttom__one')){
hideElement('.buttom-resset__one', '.dropdown-activity',elemento)
}
if(elemento.classList.contains('radio-buttom__two')){
hideElement('.buttom-resset__two', '.dropdown-interest', elemento )
}
})
})