import createWidgetHtml from "../../html/widget";
import sendPing from "../../api/sendPing";

export default function renderWidget(shadowRoot, theme, state) {
  shadowRoot.innerHTML = createWidgetHtml(theme, state);

  sendPing(shadowRoot);

  setInterval(() => {
    sendPing(shadowRoot);
  }, 30000);
}
