{% extends "base.html" %}
{% from "partials/alerts.html" import toast %}

{% block title %}Imports · CalMiner{% endblock %}

{% block head_extra %}
  <link rel="stylesheet" href="/static/css/imports.css" />
{% endblock %}

{% block content %}
  <section class="page-header">
    <div>
      <h1>Data Imports</h1>
      <p class="text-muted">Upload CSV or Excel files to preview and commit bulk updates.</p>
    </div>
  </section>

  <section class="card" data-import-module>
    <header class="card-header">
      <h2>Upload Projects or Scenarios</h2>
    </header>
    <div class="card-body">
  {% include "partials/import_upload.html" %}
  {% include "partials/import_preview_table.html" %}

      <div class="import-actions hidden" data-import-actions>
        <button class="btn primary" data-import-commit disabled>Commit Import</button>
        <button class="btn" data-import-cancel>Cancel</button>
      </div>
    </div>
  </section>

  {{ toast("import-toast", hidden=True) }}
{% endblock %}