import { h } from "./jsx";
import { Sidebar } from "./components/Sidebar";
import { PaliadinWidget } from "./components/PaliadinWidget";
import { BottomNav } from "./components/BottomNav";
import { Footer } from "./components/Footer";
import { PWAHead } from "./components/PWAHead";

export function renderTeam(): string {
  return "<!DOCTYPE html>" + (
    <html lang="de">
      <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
        <meta name="theme-color" content="#BFF355" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="default" />
        <PWAHead />
        <title data-i18n="team.title">Team &mdash; Paliad</title>
        <link rel="stylesheet" href="/assets/global.css" />
      </head>
      <body className="has-sidebar">
        <Sidebar currentPath="/team" />
        <BottomNav currentPath="/team" />

        <main>
          <section className="tool-page">
            <div className="container">
              <div className="tool-header">
                <div>
                  <h1 data-i18n="team.heading">Team</h1>
                  <p className="tool-subtitle" data-i18n="team.subtitle">
                    Alle Paliad-Kolleg:innen, gruppiert nach Standort oder Partner Unit.
                  </p>
                </div>
              </div>

              <div className="team-controls">
                <div className="glossar-search-wrap">
                  <svg className="glossar-search-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                    <circle cx="11" cy="11" r="8" />
                    <line x1="21" y1="21" x2="16.65" y2="16.65" />
                  </svg>
                  <input
                    type="text"
                    id="team-search"
                    className="glossar-search"
                    placeholder="Suchen / Search..."
                    data-i18n-placeholder="team.search.placeholder"
                    autocomplete="off"
                  />
                  <span className="glossar-count" id="team-count" />
                </div>

                <div className="team-toggle" role="tablist" aria-label="Gruppierung">
                  <button className="filter-pill active" data-group="office" type="button" data-i18n="team.group.office">
                    Nach Standort
                  </button>
                  <button className="filter-pill" data-group="department" type="button" data-i18n="team.group.department">
                    Nach Partner Unit
                  </button>
                </div>
              </div>

              <div className="team-filter-row" id="team-office-filters" aria-label="Standort">
                <button className="filter-pill active" data-office="all" type="button" data-i18n="team.filter.all">Alle</button>
              </div>

              <div className="team-filter-row" id="team-role-filters" aria-label="Rolle">
                <button className="filter-pill active" data-role="all" type="button" data-i18n="team.filter.all">Alle</button>
              </div>

              <div className="team-filter-row team-filter-row-project" id="team-project-filter" aria-label="Projekt">
              </div>

              <div className="team-broadcast-wrap" id="team-broadcast-wrap" style="display:none">
              </div>

              {/* t-paliad-223 (#53) — master "select all visible" checkbox. */}
              <div className="team-select-master-row">
                <label className="team-select-master-label">
                  <input type="checkbox" id="team-select-master" />
                  <span data-i18n="team.selection.select_all">Alle sichtbaren ausw&auml;hlen</span>
                </label>
              </div>

              <div className="team-list" id="team-list" />

              <div className="glossar-empty" id="team-empty" style="display:none">
                <p data-i18n="team.empty">Keine Treffer.</p>
              </div>
            </div>
          </section>
        </main>

        <Footer />
        <PaliadinWidget />
        <script src="/assets/team.js"></script>
      </body>
    </html>
  );
}
