{% extends "base.html" %}

{#
  Action Points feature flag.

  Exposes the zensical.toml setting `[project.extra.action_points] enabled`
  to client-side JS as `window.TOA_ACTION_POINTS_ENABLED`. This block renders
  in <head>, before extra_javascript loads in {% block scripts %}, so the
  action-points engine in docs/javascripts/extra.js can bail out immediately
  when the feature is disabled.

  Set `enabled = false` in zensical.toml to turn the ENTIRE interactive
  checklist feature off — no localStorage, no nav badges, no confetti, no
  per-click work. Checkboxes then fall back to Material's default read-only
  rendering. Defaults to ON when the key is absent.
#}
{% block extrahead %}
  {{ super() }}
  <script>
    window.TOA_ACTION_POINTS_ENABLED =
      {{ "false" if config.extra.action_points and config.extra.action_points.enabled == false else "true" }};
    window.TOA_KEEP_IN_TOUCH_ENDPOINT =
      {{ ('"' + config.extra.keep_in_touch.endpoint + '"') if config.extra.keep_in_touch and config.extra.keep_in_touch.endpoint else '""' }};
  </script>
{% endblock %}
