{% extends "datashow/base.html" %}
{% load static %}
{% block title %}
  {{ table.label }}
{% endblock title %}
{% block content %}
  {% if dataset.default_table != table %}
    <a href="{% url "datashow:dataset-index" dataset.slug %}">← {{ dataset.name }}</a>
  {% endif %}
  <h1>{{ table.label }}</h1>
  {% include "datashow/_table.html" %}
{% endblock content %}
{% block scripts %}
  <script type="importmap">
    {
      "imports": {
        "sqlite-wasm-http": "{% static "datashow/js/sqlite-wasm-http.js" %}",
        "#sqlite3-worker1-promiser.js": "{% static "datashow/js/sqlite3-worker1-promiser-bundler-friendly.mjs" %}",
        "#sqlite3.js": "{% static "datashow/js/sqlite3-bundler-friendly.mjs" %}",
        "lru-cache": "{% static "datashow/js/lru-cache.mjs" %}",
      }
    }
  </script>
  <!-- ES Module Shims import maps polyfills -->
  <script async
          src="https://ga.jspm.io/npm:es-module-shims@2.0.0/dist/es-module-shims.js"
          crossorigin="anonymous"></script>
  <script type="module">
      import * as sqliteWasmHttp from "sqlite-wasm-http";
    
      // Write main module code here, or as a separate file with a "src" attribute on the module script.
      console.log(sqliteWasmHttp);
  </script>
{% endblock scripts %}
