import initializeListeners from "../../handlers/initializeListeners";
import createWidgetHtml from "../../html/widget";
import { startCountdown } from "../timer/countdownTimer";

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

  initializeListeners(shadowRoot, theme);

  if (config.showCounter && config) {
    startCountdown(shadowRoot, config);
  }
}
