const getElement = (element) => document.querySelector(element);
const buttons = document.querySelectorAll('.app__card-button');
function addClickListener(button, tag, data) {
button.addEventListener('click', () => {
tag.setAttribute('data-contexto', data);
buttons.forEach((item) => {
item.classList.remove('active');
});
button.classList.add('active');
});
}
const html = getElement('html');
const foco = getElement('.app__card-button--foco');
const curt = getElement('.app__card-button--curto');
const long = getElement('.app__card-button--longo');
addClickListener(foco, html, 'foco');
addClickListener(curt, html, 'descanso-curto');
addClickListener(long, html, 'descanso-longo')