defmodule MicrowavepropWeb.PrivacyLive do
  @moduledoc false
  use MicrowavepropWeb, :live_view

  @impl true
  def mount(_params, _session, socket) do
    {:ok, assign(socket, :page_title, "Privacy")}
  end

  @impl true
  def render(assigns) do
    ~H"""
    <Layouts.app flash={@flash} current_scope={@current_scope} max_width="max-w-3xl">
      <.header>
        Privacy
        <:subtitle>What we collect, and what we promise to do with it.</:subtitle>
      </.header>

      <section class="space-y-6 text-sm leading-relaxed">
        <p>
          NTMS Propagation Prediction is an amateur-radio research project run by
          and for the North Texas Microwave Society. Any information we collect or
          that you submit is used exclusively to study microwave propagation and
          improve the prediction model on this site.
        </p>

        <div class="space-y-3">
          <h2 class="text-lg font-bold">We will never</h2>
          <ul class="list-disc list-outside pl-5 space-y-1">
            <li>Sell your information.</li>
            <li>Trade or barter it to third parties.</li>
            <li>
              Disclose it to anyone outside the project, except where required by law.
            </li>
          </ul>
        </div>

        <div class="space-y-3">
          <h2 class="text-lg font-bold">What we collect</h2>
          <ul class="list-disc list-outside pl-5 space-y-1">
            <li>
              <strong>Account information</strong> — when you register, we store
              your callsign, email address, and a hashed password. Email is only
              used for account confirmation and password resets.
            </li>
            <li>
              <strong>Submitted data</strong> — beacon listings, QSOs, and beacon
              monitor reports you voluntarily submit. These are published back to
              other amateurs as part of the project.
            </li>
            <li>
              <strong>Approximate location</strong> — our CDN (Cloudflare) provides
              a rough latitude/longitude derived from your IP so the map can open
              centered near you. It is not stored with your account or any
              submission.
            </li>
            <li>
              <strong>Basic request logs</strong> — standard web server logs
              (timestamp, path, status, user agent) retained for a short period
              for debugging and abuse prevention.
            </li>
          </ul>
        </div>

        <div class="space-y-3">
          <h2 class="text-lg font-bold">How it's used</h2>
          <p>
            Everything feeds one goal: calibrating and improving propagation
            predictions for the amateur microwave bands. Aggregate or anonymized
            results may appear in publications, talks, or on this site, but
            individual personal details (email, password, IP) will never be
            published.
          </p>
        </div>
      </section>
    </Layouts.app>
    """
  end
end
