const html = document.documentElement;
const addEvent = btn => {btn.addEventListener('click', e => {let theme = html.getAttribute("litewebchat-theme");
    if (theme === 'dark') {html.setAttribute("litewebchat-theme", 'light');
    } else {html.setAttribute("litewebchat-theme", 'dark');
    }
  });
};
btns.forEach(btn => {addEvent(btn);
});</script></body></html>