import { getServerSession } from "next-auth";
import ViewManager from "../../components/ViewManager";
import { authOptions } from "../../lib/auth";

export default async function ViewsPage() {
  const session = await getServerSession(authOptions);
  if (!session?.user) {
    return (
      <div className="card-muted text-center">
        <p className="text-slate-700">Bitte anmelden, um Ansichten zu verwalten.</p>
      </div>
    );
  }

  return <ViewManager />;
}
