import { createElement, qs } from '../utils/dom.js'; function closeAllExcept(list, exceptEl) { list.querySelectorAll('.faq-item.open').forEach((openEl) => { if (openEl === exceptEl) return; openEl.classList.remove('open'); qs('.faq-question', openEl).setAttribute('aria-expanded', 'false'); }); } export function createFaqItem(item, list) { const el = createElement('div', 'faq-item reveal'); el.setAttribute('role', 'listitem'); el.innerHTML = `