export default function shouldRenderWidget(config) {
  const { visibleForAdminOnly, isAdmin = false } = config;
  const placholderEl = document.querySelector(".promo-time-widget-placeholder");

  if (!placholderEl) {
    return false;
  }

  if (visibleForAdminOnly && !isAdmin) {
    return false;
  }

  return true;
}
