import {
  getPartialsConfig,
  makePartials,
} from "$root/defaults/makePartials.tsx";
import { FreshContext } from "$fresh/server.ts";
import { State } from "$root/defaults/interfaces.ts";

// deno-lint-ignore require-await
export async function Index(
  _request: Request,
  context: FreshContext<State>,
) {
  return (
    <div class="page-content">
      <h2 class="page-title">Mobilité internationale</h2>
      <p>
        Bienvenue{" "}
        <strong>
          {(context.state as unknown as { session: Record<string, string> })
            .session.displayName}
        </strong>
        .
      </p>
      <p>Suivi des mobilités : 12 semaines validées requises par élève.</p>
    </div>
  );
}

export const config = getPartialsConfig();
export default makePartials(Index);
