---
import { Session } from '@util/session';
import { Permissions } from '@util/permissions';
import { BASE_PATH } from 'astro:env/server';
import AdminLayout from '@layouts/admin/AdminLayout.astro';
import SidebarActions from '@app/admin/strikeReasons/SidebarActions.svelte';
import StrikeReasons from '@app/admin/strikeReasons/StrikeReasons.svelte';

const session = Session.sessionFromCookies(Astro.cookies, Permissions.Reports);
if (!session) return Astro.redirect(`${BASE_PATH}/admin`);
---

<AdminLayout title="Reports">
  <SidebarActions slot="actions" client:load />
  <StrikeReasons client:load />
</AdminLayout>
