            </div><!-- /dash-main__body -->
        </main><!-- /dash-main -->
    </div><!-- /dash-layout -->
</div><!-- /dash-shell -->

<script src="/assets/js/tools.js" defer></script>
<?php if (!empty($extraScripts) && is_array($extraScripts)): foreach ($extraScripts as $extraScript): ?>
<script src="<?= htmlspecialchars((string)$extraScript) ?>" defer></script>
<?php endforeach; endif; ?>
<script src="/assets/js/corpus-save.js" defer></script>

<dialog id="save-corpus-dialog" class="save-corpus-dialog">
  <form method="dialog" id="save-corpus-form">
    <h3>Save to corpus</h3>
    <p class="save-corpus-hint">This will be indexed and searchable in your private corpus.</p>
    <label>
      <span>Title <span aria-hidden="true">*</span></span>
      <input id="save-corpus-title" type="text" required autocomplete="off">
    </label>
    <label>
      <span>Tags <span class="save-corpus-optional">(comma-separated)</span></span>
      <input id="save-corpus-tags" type="text" placeholder="e.g. barnevern, 2024, kjennelse">
    </label>
    <menu>
      <button type="submit" class="btn-primary">Save</button>
      <button type="button" id="save-corpus-cancel">Cancel</button>
    </menu>
  </form>
</dialog>
</body>
</html>
